Tony Davie writes:
> >I'm quite comfortable with the idea. Guards are part of the lhs of an
> >equation, and that is where binding takes place.
> >
> >The <- syntax worries me a bit, because in the comprehension use it has a
> >different type, but the let syntax is available, and one can write
> >"let p = e" "for p <- e". I think that, to reduce possible confusion, I would
> >use, and teach, the let form. Given that, I don't object to the funny use of
> ><-.
> >
> >--brian
>
> Yes. I really like the fact that at last guards in comprehensions and those
> in function defns have the same syntax. But shouldn't they have the same
> semantics too? I would rather expect
>
> f g l| x <- l = g x
>
> or something like it, to be the map function.
>
> So I, like Brian, would prefer 'let ... = ...' to '... <- ...'
Actually f _is_ the map function (map^{Id} in identity monad ;-)
(I understand Simon Peyton Jones' proposed syntax as one restricting
the meaning of <- to identity monad just like the list comprehension
[ g x | x <- l ] is restricting <-'s meaning to list monad.)
Seriously, I like the idea.
-- Libor
____________________________________________________________________
Libor Skarvada | Masaryk University, Brno, Faculty of Informatics,
[EMAIL PROTECTED] | Botanicka 68a, CZ-60200, phone +420-5-41512355
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~