function

type function

The base type of all functions.

meth (Function: function) ! (List: list): any

Calls Function with the values in List as positional arguments.

meth (Function: function) ! (List: list, Map: map): any

Calls Function with the values in List as positional arguments and the keys and values in Map as named arguments. Returns an error if any of the keys in Map is not a string or method.

meth (Function: function) ! (Map: map): any

Calls Function with the keys and values in Map as named arguments. Returns an error if any of the keys in Map is not a string or method.

meth (Function: function) ! (Tuple: tuple): any

Calls Function with the values in Tuple as positional arguments.

meth (Function: function) ! (Tuple: tuple, Map: map): any

Calls Function with the values in Tuple as positional arguments and the keys and values in Map as named arguments. Returns an error if any of the keys in Map is not a string or method.

meth (Function: function) !! (List: list): function::partial

Deprecated since version 2.7.0: Use $! instead.

Returns a function equivalent to fun(Args...) Function(List[1], List[2], ..., Args...).

meth (Function: function) $ (Values: any, ...): function::partial

Returns a function equivalent to fun(Args...) Function(Values..., Args...).

meth (Function: function) $! (List: list): function::partial

Returns a function equivalent to fun(Args...) Function(List[1], List[2], ..., Args...).

meth (Base: function) -> (Function: function): chained

Returns a chained function equivalent to Function(Base(...)).

let F := :upper -> (3 * _)
F("hello") :> "HELLOHELLOHELLO"
F("cake") :> "CAKECAKECAKE"
meth (Base: function) ->! (F: function): function

Returns a chained function equivalent to F ! Base(...).

let F := list ->! 3 :> <chained>
F("cat") :> "t"
meth (Base: function) ->? (F: function): function

Returns a chained function equivalent to Base(...){F(it)}.

let F := 1 ->? (2 | _) -> (_ / 2) :> <chained>
list(1 .. 10 -> F)
:> [nil, 2, nil, 4, nil, 6, nil, 8, nil, 10]
meth /(Function: function): function

Returns a function equivalent to fun(Args...) Function().

type function::partial < function, sequence

TBD

meth (Arg₁: function::partial)[...]

TBD

meth (Arg₁: function::partial):arity

TBD

meth (Arg₁: function::partial):set

TBD