parsley::proc_utils
pub fn make_binary_numeric<T>( f: impl Fn(Num, Num) -> T + 'static, name: Option<&str>) -> SExp where T: Into<SExp>,
Make a procedure that takes two numeric arguments.
The underlying numeric type is f64.
use parsley::prelude::*; use parsley::proc_utils::*; let my_gte = |a, b| a >= b; assert_eq!( Context::base().eval( sexp![make_binary_numeric(my_gte, None), 555, 444] ).unwrap(), SExp::from(true), );