Bohtvaroh

Map on Closures in OCaml

Aug 4th, 2011
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.13 KB | None | 0 0
  1. let empty = fun _ -> 0
  2. let add dict key value = fun key' -> if key' = key then value else dict key'
  3. let find dict key = dict key
Advertisement
Add Comment
Please, Sign In to add comment