public
Created

Reverse Lambda, because fuck the next guy to read this

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12
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>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.