ganit-core 0.4.1

Spreadsheet formula engine — parser and evaluator for Excel-compatible formulas
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::evaluate;
use crate::types::{ErrorKind, Value};
use std::collections::HashMap;

fn run(formula: &str) -> Value {
    evaluate(formula, &HashMap::new())
}

#[test]
fn lambda_bare_returns_na() {
    // LAMBDA without invocation returns #N/A
    assert_eq!(run("=LAMBDA(x, x*2)"), Value::Error(ErrorKind::NA));
}