Last active
August 29, 2015 14:16
-
-
Save choplin/fadc00537f65cee85216 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
scala> case class Foo(i:Int) | |
defined class Foo | |
scala> Foo.isInstanceOf[Int => Foo] | |
res4: Boolean = true | |
scala> Seq(1,2,3).map(Foo) | |
res5: Seq[Foo] = List(Foo(1), Foo(2), Foo(3)) | |
scala> def foo(f: Int => Foo)(i:Int) = f(i) | |
foo: (f: Int => Foo)(i: Int)Foo | |
scala> foo(Foo)(1) | |
res9: Foo = Foo(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment