Twan van Laarhoven <[EMAIL PROTECTED]> wrote:
> > The general form of a pattern binding is p match, where a match is
> > the same structure as for function bindings above; in other words,
> > a pattern binding is:
> >
> > p | g1 = e1
> > | g2 = e2
> > ...
> > | gm = em
> > where { decls }
>
> I did not even know these things existed, is there anyone who actually
> uses general pattern bindings?
It is worth mentioning that such pattern bindings are not only used at
the top-level - they are also valid in local definitions, where the
guards may involve variables bound at an outer scope. This makes them
highly useful.
Regards,
Malcolm
_______________________________________________
Haskell-prime mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-prime