[chuck-users] wishlist for the new year
Hans Aberg
haberg at math.su.se
Mon Jan 4 04:17:35 EST 2010
On 4 Jan 2010, at 01:15, joerg piringer wrote:
> great idea!
> i love chuck but i like lua more as a language.
Haskell has a much more concise syntax, it seems. The Fibonacci table
here
http://en.wikipedia.org/wiki/Lua_(programming_language)#Example_code
can in Haskell be computed using a recursively defined list:
fib = [0,1] ++ [fib!!(i-1) + fib!!(i-2)| i <- [2..]]
Haskell supports infinite lists, like [2..] whose values are lazily
computed (at need, caching intermediate results). So the potentially
infinite fib table above is computed to the point it is needed.
Hans
More information about the chuck-users
mailing list