summaryrefslogblamecommitdiff
path: root/libs/util.ml
blob: b1fcdc4a6d1587c0be6928fbdf53107a9a87e10a (plain) (tree)
1
2
3
4
5
6
7
8
9
                   







                                   

                  








                                                  
exception TypeError

module VarMap = Mapext.Make(String)

let rec fix f s =
  let fs = f s in
  if fs = s
    then fs
    else fix f fs

let (@@) f x = f x

let print_list x l =
    Format.printf "%s: " x;
    let rec aux = function
        | [] -> ()
        | [a] -> Format.printf "%s" a
        | p::q -> Format.printf "%s, " p; aux q
    in
    Format.printf "["; aux l; Format.printf "]@.";