Skip to main content

Module higher_order_function

Module higher_order_function 

Source
Expand description

Declaration of built-in (higher order) functions. This module contains built-in functions’ enumeration and metadata.

Generally, a function has:

  • a signature

  • a return type, that is a function of the incoming argument’s types

  • the computation, that must accept each valid signature

  • Signature: see Signature

  • Return type: a function (arg_types) -> return_type. E.g. for array_transform, ([f32], v -> v*2) -> f32, ([f32], v -> v > 3.0) -> bool.

This module also has a set of coercion rules to improve user experience: if an argument i32 is passed to a function that supports f64, it is coerced to f64.

Structs§

HigherOrderFunctionExpr
Physical expression of a higher order function