
5 Feb
2006
5 Feb
'06
3:33 p.m.
Ben Rudiak-Gould wrote:
Paul Hudak wrote:
Minor point, perhaps, but I should mention that : is not special syntax -- it is a perfectly valid infix constructor.
<snip> ... but no more confusing than the fact that [f x | x <- xs] is not the same as (map f xs).
Can you explain why? On page 258 of Paul Hudak's book "The Haskell School of Expression" he states that do x<- xs; return (f x) is equivalent to [f x | x <- xs] "which is clearly just map f xs" I can't find anything wrong with the example in the book but perhaps I've missed something? Regards, Brian.