type ['a;'b]graph = L <'a> | N <'b ref,'b ref>;; type 'a tree = Lf <'a> | Nd <'a tree,'a tree>;; let rec mem x = \ []; false | [h|t]; if (x=h) then:true else:(mem x t);; let rec (depth :- 1 seen a -o 1 seen a) seen:l x = if (mem x l) then: else: ;; let rec depth_all x = a!x; \ (L v); /[v] | (N y z); depth_all y \l; depth_all z \l' /l@l' ;; let rec tree_of_graph x = a!x; \ (L v); /Lf v | (N x y); tree_of_graph x \x; tree_of_graph y \y /Nd x y ;; let rec graph_of_tree = \ (Lf v); a <- L v | (Nd x y); graph_of_tree x \x; graph_of_tree y \y; a <- N x y ;; let open_a (x : ['a;>]pool) = ;; #show (open_std;put"\"open_a dummy\" to open the pool.\n";close_std);;