Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type arbre = Noeud of bool ref * (char * arbre) list ref
- (* l is a list of string. creer_branche takes a list of char and returns a Noeud *)
- let creer l =
- let rec make_tree l acc = match l, acc with
- | [], acc' -> acc'
- | word :: l', (a, b) -> make_tree (l' Noeud(a, ref (creer_branche (explode word))::!b))
- in make_tree (l vide)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement