
i would just like to say thank you for all the extensive replies. after fiddling with them for an afternoon i'm positive i grokked the concept. it's just too bad the nice wrapper concept from [1] does not seem to be directly applicable to fix in haskell, since they require untyped side-effects.... anyhow, this has been very instructive. thanks again! v. [1] http://citeseer.ist.psu.edu/mcadams01practical.html Jason Dagit wrote:
On 5/28/07, Donald Bruce Stewart
wrote: This thread should end, guys. It is inappropriate for the Haskell lists, and appears to have been a simple misunderstanding anyway.
Thanks everyone. Please stay friendly!
-- Don
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
And other (longer) variations which generate only powers of two. It's a great conversation starter for teaching about fix.
Jason _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe