Module lyaml.functional

Functions

isnull (x) lyaml.null predicate.
iscallable (x) Callable predicate.
anyof (fns) Compose a function to try each callable with supplied args.
id (...) Return arguments unchanged.

Tables

NULL lyaml.null value.


Functions

isnull (x)
lyaml.null predicate.

Parameters:

  • x operand

Returns:

    bool true if x is lyaml.null.
iscallable (x)
Callable predicate.

Parameters:

  • x operand

Returns:

    bool true if x is a function has a __call metamethod

Usage:

    r = iscallable(x) and x(...)
anyof (fns)
Compose a function to try each callable with supplied args.

Parameters:

  • fns table list of functions to try

Returns:

    function

    a new function to call ... functions, stopping

    and returning the first non-nil result, if any
    
id (...)
Return arguments unchanged.

Parameters:

  • ... arguments

Returns:

    ...

Tables

NULL
lyaml.null value.
generated by LDoc 1.4.6 Last updated 2020-11-27 16:17:28