Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Joshua Cranmer Newsgroups: comp.lang.java.programmer Subject: Re: new Java lambda syntax Date: Thu, 08 Sep 2011 20:50:29 -0500 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 9 Sep 2011 01:51:00 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="WpcHJSul77m+zlbR9GVqkA"; logging-data="18285"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LHBYEM3hhCsmNFofnpx03vrrOqDdgBDQ=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 In-Reply-To: Cancel-Lock: sha1:T43MZs29tsj56023pmzbSu9ceQ8= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7743 On 9/8/2011 5:18 PM, Roedy Green wrote: > On Thu, 08 Sep 2011 13:19:22 -0700, markspace<-@.> wrote, quoted or > indirectly quoted someone who said : > > >> x => x + 1 >> (x) => x + 1 > > That seems backwards to me. Surely you really mean > x<= x + 1 No, the idea of a lambda is it's a "function" that converts a tuple of (x) to a tuple of (x + 1), so the value x becomes x + 1 in the end. The left-facing arrow instead is more evocative of "assigning" x + 1 to x, which is why it gets occasional use as an assignment operator. I suspect <=-ish operators are also more common in purer functional languages, but I am no authority there. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth