Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* Okasaki, Exercise 3.2 page 19 *)
- let insert x = function
- | Empty -> singleton x
- | Node(_,y,a2,b2) as h2 ->
- if Less.than x y then Node(1,x,h2,Empty) (* make_tree x Empty h2 *)
- else make_tree y a2 (merge (singleton x) b2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement