Skip to main content

builtin_unary_pred

Macro builtin_unary_pred 

Source
macro_rules! builtin_unary_pred {
    ($self:expr, $args:expr, $check:expr) => { ... };
}
Expand description

Macro for unary predicate builtins.

Many builtins follow the pattern of extracting one argument and returning a boolean based on some predicate on the value.

ยงExample

builtin_unary_pred!(self, args, |v| v.is_nil()) extracts one argument and returns a boolean result of the predicate.