Skip to main content

syms

Macro syms 

Source
macro_rules! syms {
    ($ctx:expr; $($name:ident),+ $(,)?) => { ... };
}
Expand description

Declare multiple symbolic variables at once.

Each identifier becomes a let binding of type Ex in the current scope.

ยงExamples

use symplex::prelude::*;
use symplex::syms;

let ctx = Context::new();
syms!(ctx; x, y, z);
let expr = &x + &y + &z;
assert_eq!(format!("{expr}"), "x + y + z");