News for hackers. Stuff that matters.
Re:... because Ruby isn't terse enough yet by yariv on Saturday October 27, 2007 @03:07PM (#73230)
The Erlang version is unnecessarily verbose (and also semantically different) because it uses 2 processes. It can be rewritten as

Foo = fun(N) -> put(var, N), fun(X) -> V = get(var) + X, put(var, V), V end end.

It's not as concise as Ruby or Arc, but it's a one liner. However, similar to Haskell, this style of programming is discouraged in Erlang.

There are no comments on this comment yet.