Why does andThen only exist for single argument functions in Scala?
andThen
The following code works:
val double = (x: Int) => x * 2 val timesFou
Another way to write theons's answer is to use:
val multiplyAndDouble = double compose multiply.tupled val result = multiplyAndDouble(2, 6) // res 24