Last active
December 16, 2017 12:50
-
-
Save darsen/27649459d55a2e1bf791 to your computer and use it in GitHub Desktop.
Java Simple Lambda Koan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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