diff options
Diffstat (limited to 'Scala/sandbox/curry.scala')
-rw-r--r-- | Scala/sandbox/curry.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Scala/sandbox/curry.scala b/Scala/sandbox/curry.scala index 21f287a..84b00ee 100644 --- a/Scala/sandbox/curry.scala +++ b/Scala/sandbox/curry.scala @@ -17,12 +17,15 @@ object Curry { sumF } + def cube (x: Int): Int = x * x * x + def sumInts = sumCurry(x => x) def sumCubes = sumCurry(x => x * x * x) def run = { println("Curry") println(sum(x => x * x, 3, 5)) + println(sumCurry(cube)(3, 5)) println(sumInts(3, 5)) println(sumCubes(3, 5)) } |