Trait calcu_rs::atom::SymbolicExpr
source · pub trait SymbolicExpr:
Clone
+ PartialOrd
+ PartialEq
+ Into<Expr> {
// Provided methods
fn reduce(&self) -> Expr { ... }
fn is_atom(&self) -> bool { ... }
fn n_args(&self) -> usize { ... }
fn args(&self) -> &[Expr] { ... }
fn args_mut(&mut self) -> &mut [Expr] { ... }
fn iter_args(&self) -> impl Iterator<Item = &Expr> { ... }
fn map_args(self, map_fn: impl Fn(&mut Expr)) -> Self { ... }
}
Provided Methods§
sourcefn reduce(&self) -> Expr
fn reduce(&self) -> Expr
basic simplification that can be applied regardless of context
e.g 1 + 2 => 3
fn is_atom(&self) -> bool
fn n_args(&self) -> usize
fn args(&self) -> &[Expr]
fn args_mut(&mut self) -> &mut [Expr]
fn iter_args(&self) -> impl Iterator<Item = &Expr>
fn map_args(self, map_fn: impl Fn(&mut Expr)) -> Self
Object Safety§
This trait is not object safe.