Why does andThen only exist for single argument functions in Scala?
andThen
The following code works:
val double = (x: Int) => x * 2 val timesFou
I can't speak as to why Function2 doesn't supply and andThen, but Scalaz defines Functor instances for functions of various arities where map is equivalent to andThen, meaning you could write
Function2
Functor
map
val multiplyAndDouble = multiply map double