Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type (a',b') Tree=Lead of a'| Noeud of b'*a'*(a',b')Tree list
- type strTree= st of int | Leaf of String | Tree of string *Strin* strTree list
- val Tree-strTree :(a'->string)->(b'->string)->(a',b')Tree -> strTree
- let Tree-strTree p pp a=
- let convert=fun x -> string_of_int x
- let rec mapA convert a' =match a' with
- | Lead _ -> Tree ("","",[])
- | Noeud (f,r,l)-> Tree(convert (p f),convert(pp r) ,
- map(fun y->mapA convert y)l)
- in
- mapA convert a
Add Comment
Please, Sign In to add comment