[Haskell-cafe] AND/OR Perceptron

Ryan Ingram ryani.spam at gmail.com
Mon Nov 2 09:38:57 EST 2009

I suppose I wasn't entirely clear.

"where" is syntactic sugar for "let...in", pattern matching is syntactic
sugar for "case", and guards are syntactic sugar for "if..then..else" and/or
"case" (for pattern guards)

In fact, the whole reason for the existence of "where" is so that it can
attach at a higher-level scope and make use of the other syntactic sugar
(like guards).  Also, I find the postfix definitions in "where" to generally
be more readable, but that is a matter of taste.

  -- ryan

On Sat, Oct 31, 2009 at 11:33 AM, Chaddaï Fouché
<chaddai.fouche at gmail.com>wrote:

> On Sat, Oct 31, 2009 at 8:09 PM, Ryan Ingram <ryani.spam at gmail.com> wrote:
> >
> > "where" is just syntactic sugar for "let...in"
> That's not perfectly true : "where" and "let...in" don't attach to the
> same syntactic construction, "where" attaches to a definition and can
> works for several guard clauses whereas "let ... in expression" is an
> expression in itself.
> --
> Jedaï
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091102/ebd6f9ee/attachment.html

More information about the Haskell-Cafe mailing list