Peter Hercek <[EMAIL PROTECTED]> wrote:
> 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).
>
Strangely enough, it reads exactly the same to me. IMHO, not working
like filter is the thing that makes this wicked: guard doesn't care
about what is returned, you could as well say (\_ -> [("foo","bar")])
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe