On Wed, Oct 19, 2016 at 8:25 PM, Guillaume Laforge <glafo...@gmail.com> wrote: > That's what I thought too. > Although there's one :: case that .& doesn't support in Groovy. > (details escape me at this point as I'm in a hurry to go & grab lunch :D)
I think these are the references you had in mind Guillaume: https://issues.apache.org/jira/browse/GROOVY-7772 https://github.com/apache/groovy/pull/287 There is some useful discussion but also a final comment that a bit more work is required over and above the proposal in that PR. Cheers, Paul. > On Wed, Oct 19, 2016 at 12:23 PM, daniel_sun <realblue...@hotmail.com> > wrote: >> >> Hi Jochen, >> >> I plan to map Java's *::* to Groovy's *.&*, the following code is ok >> now. What do you think about it? >> >> [1, 2, 3].stream().forEach(System.out.&println) // object method, >> [1, 2, 3].stream().forEach(System.out::println) >> [1, 2, 3].stream().forEach(Objects.&requireNonNull) // class method, [1, >> 2, >> 3].stream().forEach(Objects::requireNonNull) >> >> Cheers, >> Daniel.Sun >> >> >> >> -- >> View this message in context: >> http://groovy.329449.n5.nabble.com/Lambda-expression-for-Groovy-3-tp5736169p5736195.html >> Sent from the Groovy Dev mailing list archive at Nabble.com. > > > > > -- > Guillaume Laforge > Apache Groovy committer & PMC Vice-President > Developer Advocate @ Google Cloud Platform > > Blog: http://glaforge.appspot.com/ > Social: @glaforge / Google+