[Haskell-cafe] The C Equiv of != in Haskell miscommunication
thread
Roberto Zunino
zunino at di.unipi.it
Wed May 30 07:48:56 EDT 2007
Jason Dagit wrote:
> On 5/28/07, Donald Bruce Stewart <dons at cse.unsw.edu.au> 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.
More information about the Haskell-Cafe
mailing list