[Haskell-cafe] Re: Grokking monads by not overlooking concatMap
Peter Hercek
phercek at gmail.com
Mon May 5 12:55:21 EDT 2008
Achim Schneider wrote:
> -- That's the one I've been looking for. Remember that
> -- return e = [e]
> f'''' = concatMap
> (\x -> concatMap
> (\y -> concatMap
> (\_ -> [(x,y)])
> (if x*y == 8 then [()] else []))
> [2..8])
> [1..4]
>
> Morale: Premature term elimination is the root of all misunderstanding.
>
> Haskell wins the wickedness of design contest by using [()] and [] as
> truth values.
Maybe you wanted to say: "... by using [()] as True value and [] as
False value" ... which does not seem that wicked (at least to me).
Peter.
More information about the Haskell-Cafe
mailing list