[Haskell-cafe] ANNOUNCE slot-lambda

Alois Cochard alois.cochard at gmail.com
Mon Apr 7 21:14:30 UTC 2014


Understood and actually I forgot you can not use "_", so why not a symbol
which don't look like a number?


On 7 April 2014 22:16, Tom Ellis <
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:

> On Tue, Apr 08, 2014 at 03:58:30AM +0700, Kim-Ee Yeoh wrote:
> > On Mon, Apr 7, 2014 at 11:02 PM, ducis <ducis_cn at 126.com> wrote:
> >
> > > It lets your write lambdas with 'slots' without inventing names for the
> > > parameters.
> > >
> > > [s| ı + ı |]  =  \x y -> x+y
> > >
> > >
> > I have no background in this 'slot lambda' and a search reveals this
> > package as the only hit.
> >
> > Which may explain why I find the example given confusing. Why would [s|
> 1+1
> > |] not be equivalent to \x->x+x ?
>
> Because each slot stands for a new variable.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
*Alois Cochard*
http://aloiscochard.blogspot.com
http://twitter.com/aloiscochard
http://github.com/aloiscochard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140407/0ba1f3d9/attachment.html>


More information about the Haskell-Cafe mailing list