Guest User

Untitled

a guest
Feb 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. type (a',b') Tree=Lead of a'| Noeud of b'*a'*(a',b')Tree list
  2. type strTree= st of int | Leaf of String | Tree of string *Strin* strTree list
  3. val Tree-strTree :(a'->string)->(b'->string)->(a',b')Tree -> strTree
  4.  
  5. let Tree-strTree p pp a=
  6. let convert=fun x -> string_of_int x
  7. let rec mapA convert a' =match a' with
  8. | Lead _ -> Tree ("","",[])
  9. | Noeud (f,r,l)-> Tree(convert (p f),convert(pp r) ,
  10. map(fun y->mapA convert y)l)
  11. in
  12. mapA convert a
Add Comment
Please, Sign In to add comment