On Fri, Feb 28, 2014 at 9:43 AM, clay <[email protected]> wrote:

>
> > "Java's lambda approach is unique. It is more concise than scala's (due
> to not needing to mention the types of the variables),"
>
> This doesn't sound correct. Scala offers type inference of lambda
> parameters:
>
> val l = List(1,2,3)
> l.fold(0)((a,b) => a+b)
>
 You can go one step further:

scala> l.fold(0)(_ + _)
res0: Int = 6

-- 
Cédric

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/javaposse.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to