
10 Oct
2008
10 Oct
'08
5:56 p.m.
On Fri, 2008-10-10 at 10:59 -0700, Daryoush Mehrtash wrote:
I was in fact trying to figure out how "guard" worked in the "do". The interesting (for a beginner) insight is that:
[()] map f = [f]
I don't think any clarity is added by made-up notation. I think you mean map f [()] = [f ()] or [()] >>= f = f () or [()] >> f = f or do [()] f = f or [ f | _ <- [()] ] = [ f ]
--( just as any list with one element would have been such as [1] map f = [f] ) where as
[] map f = []
And map f [] = [] or [] >>= f = [] or [] >> f = [] or do [] f = [] or [ f | _ <- [] ] = [] jcc