Created
September 29, 2012 17:37
-
-
Save joshcough/3804676 to your computer and use it in GitHub Desktop.
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
// The hard way to create a Function object | |
new Function1[PlayerInteractEvent, Unit]{ | |
def apply(e:PlayerInteractEvent): Unit = println(e) | |
} | |
// The easy way | |
(e:PlayerInteractEvent) => println(e) | |
// And in the right context, an even easier way | |
e => println(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment