What's the purpose of Function.const?
-
30-10-2019 - |
Question
It is in ScalaDoc but without much documentation. It seems that it always returns the first parameter.
Function.const(1)(2)
for instance returns 1
.
Why does it exist and why is it useful?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow