Created
August 3, 2012 20:55
-
-
Save mccv/3251441 to your computer and use it in GitHub Desktop.
Reverse Lambda, because fuck the next guy to read this
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
scala> class Foo { | |
| def <=: (f: (Int) => Boolean) = f(1) | |
| } | |
defined class Foo | |
scala> val f = new Foo() | |
f: Foo = Foo@a06812d | |
scala> { x:Int => true } <=: f | |
res5: Boolean = true | |
scala> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment