Skip to content

Instantly share code, notes, and snippets.

@darsen
Last active December 16, 2017 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save darsen/27649459d55a2e1bf791 to your computer and use it in GitHub Desktop.
Save darsen/27649459d55a2e1bf791 to your computer and use it in GitHub Desktop.
Java Simple Lambda Koan
interface Caps {
public String capitalize(String name);
}
@Koan
public void simpleLambda() {
Caps caps = (String n) -> {
return n.toUpperCase();
};
String capitalized = caps.capitalize("James");
assertEquals(capitalized, __);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment