Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lambda expressions of .NET in Java

I recently moved from C# to Java [again]. But I badly miss lambda expressions and things like IEnumerable.Foreach of C#. So I am looking for a lambda expression library in Java.

are there better libraries than LambdaJ?

Also is clojure directly inlinable in Java programs? That is can I mix clojure code in Java functions?

like image 264
Fakrudeen Avatar asked Jan 23 '11 18:01

Fakrudeen


1 Answers

Java 8 might have lambda support natively. Until then you can use a combination of anonymous inner classes and libraries like google-guava. Below are other libraries that you can look into

  • http://commons.apache.org/collections/
  • http://functionaljava.org/
  • http://functionalj.sourceforge.net/
  • http://www.agical.com/jambda/

Or better look at Scala

like image 141
Aravind Yarram Avatar answered Oct 30 '22 21:10

Aravind Yarram