apply()
apply<
T
,R
>(f
): (x
) =>R
Takes an unary function and applies it to the given argument.
Type Parameters
• T
The type of input value.
• R
The return type of given function.
Parameters
f
(x
) => R
The function to apply to the value.
Returns
Function
Parameters
x
T
Returns
R
Remarks
A combinator
λab.ab
apply :: (a → b) → a → b
pure function
Example
apply((a) => a + 6)(3);
// 9