[Haskell] Newbie: fix

phiroc at free.fr phiroc at free.fr
Wed May 2 11:23:47 EDT 2007


Hello,

could someone please explain why "fix" is necessary here:

fix (\f l -> if null l then [] else let (s,e) = break (==' ') l in s:f (drop 1
e))

Source: http://www.haskell.org/haskellwiki/Blow_your_mind

Thanks.

phiroc
-------------- next part --------------
w?m?]y?????{????m???&?y'?	?zw^?+???-??.n7??6?zz
j???7??N??Xm????!j?
?Z+??b???j)??$zYj?Zr?????M;??6??6??=??????u??
-------------- next part --------------
Hello,

could someone please explain why "fix" in necessary here:

fix (\f l -> if null l then [] else let (s,e) = break (==' ') l in s:f (drop 1
e))

Source: http://www.haskell.org/haskellwiki/Blow_your_mind

Thanks.

phiroc




More information about the Haskell mailing list