diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-01-17 23:28:48 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-01-17 23:28:48 +0100 |
| commit | 9cc61497ed8a2336f33407d3262181e4ac3b46cb (patch) | |
| tree | aac75b57b0fffea64abcd23cbac4d27c875fee48 /src/function.rs | |
| parent | 77cf9aa7535a1d9481f0bd3caeea26e2b85c5019 (diff) | |
add commonsense and expression_functions
Diffstat (limited to 'src/function.rs')
| -rw-r--r-- | src/function.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/function.rs b/src/function.rs index 442d987..0da4574 100644 --- a/src/function.rs +++ b/src/function.rs @@ -16,6 +16,10 @@ impl FunctionArgument { pub fn len(&self) -> usize { self.args.len() } + + pub fn data(&self) -> &[Complex] { + &self.args + } } pub trait Function { @@ -24,7 +28,7 @@ pub trait Function { #[macro_export] macro_rules! functions { - ({$($x:expr => $y:expr), *}) => { + {$($x:expr => $y:expr), *} => { { let mut h : HashMap<String, Box<dyn Function>> = HashMap::new(); $( |