[Haskell-cafe] let vs. where

Lennart Augustsson lennart at augustsson.net
Thu Nov 15 19:26:20 EST 2007


No, Haskell functions take exactly one argument.

On Nov 14, 2007 1:05 AM, Robin Green <greenrd at greenrd.org> wrote:

> On Tue, 13 Nov 2007 13:51:13 -0800
> "Dan Piponi" <dpiponi at gmail.com> wrote:
>
> > Up until yesterday I had presumed that guards only applied to
> > functions. But I was poking about in the Random module and discovered
> > that you can write things like
> >
> > a | x > 1 = 1
> >   | x < -1 = -1
> >   | otherwise = x
> >
> > where 'a' clearly isn't a function.
>
> Isn't it a function taking zero arguments?
> --
> Robin
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071116/269c5233/attachment.htm


More information about the Haskell-Cafe mailing list