Function — Function Combinators
Part of the std module. Available via import std.
Standard function combinators.
Combinators
identity
identity: x:a. a
x
The identity function. Returns its argument unchanged. Also known as the I combinator.
const
const: x:a. y:b. a
x
Returns the first argument, ignoring the second. Also known as the Kestrel (K combinator).
starling
starling: f:(t. a. b). g:(t. a). t:t. b
f t (g t)
The S combinator. Applies f to t and the result of g t.
apply
apply: f:(a. b). x:a. b
f x
Apply a function to a value. Also known as the A combinator or $ in Haskell.
ylppa
ylppa: x:a. f:(a. b). b
f x
Apply a value to a function (reversed apply). Also known as the Thrush (T combinator) or & in Haskell.
curry
curry: f:(a. b. c). x:a. (b. c)
y. f x y
Partially apply the first argument of a binary function, returning a unary function.