News for hackers. Stuff that matters.
Re:... because Ruby isn't terse enough yet by rkts on Saturday October 27, 2007 @07:52PM (#73292)
In ML you can get a similar terseness to that of Haskell, but with support for imperative programming. If we allow the increment function to be predefined (as the Arc example does):

 let inc a b = a := !a +/ b; !a
then foo becomes:

 let foo n = inc (ref n)
or, with the help of the composition operator:

 let (<<) f g x = f (g x)

 let foo = inc << ref

There are no comments on this comment yet.