INNER CODE UNIT · Rust

Function

medialab/xan · src/moonblade/functions/mod.rs:26

pub type Function = fn(BoundArguments) -> FunctionResult;

pub fn get_function(name: &str) -> Option<(Function, FunctionArguments)> {
    Some(match name {
        // Operators
        "==" => (
            |args| ops::abstract_compare(args, Ordering::is_eq),
            FunctionArguments::binary(),
        ),
        ">" => (
            |args| ops::abstract_compare(args, Ordering::is_gt),
            FunctionArguments::binary(),
        ),
        ">=" => (
            |args| ops::abstract_compare(args, Ordering::is_ge),
            FunctionArguments::binary(),
        ),
        "<" => (

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…