Added LT, GT, LTE, and GTE functions, and big test coverage
This commit is contained in:
parent
5d89c6b684
commit
c74d6f5ddf
6 changed files with 468 additions and 11 deletions
48
src/stl.rs
48
src/stl.rs
|
|
@ -291,7 +291,7 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
|
|||
conditional_branches: false,
|
||||
docs: math::EXP_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::exp_callback)),
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
|
|
@ -302,7 +302,51 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
|
|||
conditional_branches: false,
|
||||
docs: math::MOD_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::mod_callback)),
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"gt?".to_string(),
|
||||
Symbol {
|
||||
name: String::from("gt?"),
|
||||
args: Args::Lazy(2),
|
||||
conditional_branches: false,
|
||||
docs: math::ISGT_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::isgt_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"lt?".to_string(),
|
||||
Symbol {
|
||||
name: String::from("lt?"),
|
||||
args: Args::Lazy(2),
|
||||
conditional_branches: false,
|
||||
docs: math::ISLT_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::islt_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"gte?".to_string(),
|
||||
Symbol {
|
||||
name: String::from("gt?"),
|
||||
args: Args::Lazy(2),
|
||||
conditional_branches: false,
|
||||
docs: math::ISGTE_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::isgte_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"lte?".to_string(),
|
||||
Symbol {
|
||||
name: String::from("lt?"),
|
||||
args: Args::Lazy(2),
|
||||
conditional_branches: false,
|
||||
docs: math::ISLTE_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::islte_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue