Skip to content

Instantly share code, notes, and snippets.

@Xyene
Created January 30, 2013 22:09
Show Gist options
  • Save Xyene/4677624 to your computer and use it in GitHub Desktop.
Save Xyene/4677624 to your computer and use it in GitHub Desktop.
A snippet emulating a lambda expression for Java 7-
abstract class Lambda<T> {
T val;
public Lambda(Object... args) {
val = go(args);
}
protected abstract T go(Object... args);
public T get() {
return val;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment