What's the purpose of Function.const?

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?

17
задан soc 8 May 2011 в 00:23
поделиться