Skip to content

Instantly share code, notes, and snippets.

@xenoterracide
Created September 3, 2014 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xenoterracide/0205464271096e6c97a2 to your computer and use it in GitHub Desktop.
Save xenoterracide/0205464271096e6c97a2 to your computer and use it in GitHub Desktop.
Java 8 functions
class Logged {
public static void exec ( Function<String,Void> log ) {
log.apply("hello world");
}
}
Logged.exec( s -> System.out.println(s) );
Logged.exec( s -> log.info(s) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment