Adding Haskell's `where` keyword to OCaml

from blog Alex Clemmer, | ↗ original
I’ve recently been learning OCaml in my free time at the Hacker School space. Normally, if you want to define multiple variables in OCaml, you chain a bunch of lets together. This works in roughly the same way lisp’s let and let* work: (* OCaml function, computes (x+2)*2 *) let foo x = let y = x+2 in let z = y*2 in z...