Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec tree_zip t1 t2 =
- match (t1,t2) with
- | (Empty, Empty) -> Empty
- | (_, Empty) -> raise Mismatch
- | (Empty, _) -> raise Mismatch
- | (Node (n1i, n1l), Node (n2i, n2l)) ->
- let f (a,b) = tree_zip a b in
- Node ((n1i, n2i, List.map f(zip n1l n2l)));;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement