
30 May
2007
30 May
'07
11:48 a.m.
Jason Dagit wrote:
On 5/28/07, Donald Bruce Stewart
wrote: P.S. Have some cute code:
Control.Monad.Fix.fix ((1:) . scanl (+) 1)
Speaking of cute code, I'm fond of this:
map length . List.group . Control.Monad.Fix.fix $ show
Indeed, very nice examples! I actually misread the first one as Control.Monad.Fix.fix ((1:) . tail . scanl (+) 1) which is quite nice too, although map (2^) [0..] would be much simpler! ;-) Zun.