Higher Order Functions
Higher order functions can take function as a parameter
Higher order functions can return a function
fun
twice
(f: (T)->T) : (T)->T = f(f(it))
fun
f
(x: Int) = x +
3
{ println(twice(::f)(
7
)) }
Back
Home
Next