use ganit_core::{evaluate, Value};
use std::collections::HashMap;
pub fn eval(formula: &str) -> Value {
evaluate(formula, &HashMap::new())
}
pub fn eval_with(formula: &str, vars: impl IntoIterator<Item = (&'static str, Value)>) -> Value {
let mut map = HashMap::new();
for (k, v) in vars {
map.insert(k.to_string(), v);
}
evaluate(formula, &map)
}