
29 May
2007
29 May
'07
1:09 p.m.
On Tue, May 29, 2007 at 02:19:31PM +0200, Tomasz Zielonka wrote:
On Tue, May 29, 2007 at 12:15:23PM +0200, Vincent Kraeutler wrote:
ever the interested amateur, i admittedly remain stumped by fix (there's evidence i'm not the only one [1])
The above code is equivalent to
let l = 1 : scanl (+) 1 l in l
which is a bit easier to decipher.
The rest is maths and the subtleties of lazy evaluation. ... and these are the things you need to focus on to understand this code. In this case the use of fix is almost a small syntactic issue - you can eliminate it by inlining its definition.
Best regards Tomek