is there a way where I can get the string representation of a function?
val f = List(1, 2, 3, 4, 66, 11).foldLeft(55)_
f
is a function of type ((Int, Int) => Int) => Int
, and that would be the representation I am looking for, but I can't find it anywhere.
the toString
method was my first try, of course, but all it returns is <function1>
. scala REPL does it right, and the Documentation too. There must be a way?
Regards.