Scala allows the definition of higher-order functions. These are functions that take other functions as parameters, or whose result is a function. Here is a function apply
which takes another function f
and a value v
and applies function f
to v
:
This is a companion discussion topic for the original entry at http://docs.scala-lang.org//tutorials/tour/higher-order-functions.html.html