function

fun function::constant(Value: any): function::value

TBD

fun function::variable(Value: any): function::value

TBD

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 (Function: function) $! (List: list, Arg₃: map): function::partial

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

meth (Function: function) $! (List: map): 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, 1, nil, 2, nil, 3, nil, 4, nil, 5]
meth /(Function: function): function

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

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

Returns a chained function equivalent to Function(Base(Arg₁), Base(Arg₂), ...).

let F := :upper => +
F("h", "e", "l", "l", "o") :> "HELLO"
meth (Arg₁: function):source

TBD

type function::partial < function, sequence

TBD

fun function::partial(Function: function, Size: integer): function::partial

TBD

meth (Arg₁: function::partial) <> (Arg₂: function::partial)

TBD

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

TBD

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

TBD

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

TBD

type function::value < function

TBD

meth (Arg₁: function::value) <> (Arg₂: function::value)

TBD