Jason Dagit wrote:
On 5/28/07, Donald Bruce Stewart <[EMAIL PROTECTED]> 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.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to