ganit_core/eval/functions/logical/lambda.rs
1use crate::eval::functions::EvalCtx;
2use crate::parser::ast::Expr;
3use crate::types::{ErrorKind, Value};
4
5/// Bare LAMBDA call without immediate invocation (e.g. `=LAMBDA()` or
6/// `=LAMBDA(x,x*2)` stored in a cell but not called). Returns #N/A per
7/// Google Sheets / Excel semantics.
8///
9/// Immediately-invoked LAMBDA (`=LAMBDA(x,x*2)(5)`) is handled by
10/// `eval_apply` in `eval/mod.rs` via the `Expr::Apply` AST node.
11pub fn lambda_fn(args: &[Expr], _ctx: &mut EvalCtx<'_>) -> Value {
12 let _ = args;
13 Value::Error(ErrorKind::NA)
14}
15
16#[cfg(test)]
17mod tests;