function!() { /* proc-macro */ }Expand description
Procedural macro for creating function expressions
§Syntax
ⓘ
function!(sin) // Zero args
function!(sin, x) // One arg (x is an Expression)
function!(log, x, y) // Two args
function!(f, a, b, c) // N args§Examples
ⓘ
use mathhook_macros::function;
use mathhook_core::expr;
// Zero-argument function
let gamma_call = function!(gamma);
// Single argument
let x = expr!(x);
let sin_x = function!(sin, x);
// Multiple arguments
let log_xy = function!(log, x, expr!(2));