Created
March 6, 2018 08:24
-
-
Save Mithrandir0x/9b82e74046e8401eac2a621641f53b61 to your computer and use it in GitHub Desktop.
Functed, Tupled and Curried
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> def foo(x: Int, y: Double) = x * y | |
foo: (x: Int,y: Double)Double | |
scala> foo _ | |
res0: (Int, Double) => Double = <function2> | |
scala> foo _ tupled | |
res1: ((Int, Double)) => Double = <function1> | |
scala> foo _ curried | |
res2: (Int) => (Double) => Double = <function1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment