re-implement lambdas

This commit is contained in:
2024-10-16 16:34:36 -04:00
parent 7dc88b8fb0
commit 283f5cdb41
2 changed files with 2 additions and 2 deletions

View File

@@ -352,7 +352,7 @@ where
Ok(Value::Nil)
}
}
ParseTree::LambdaDefinition(func) => todo!(),
ParseTree::LambdaDefinition(func) => Ok(Value::Function(func)),
}
}
}

View File

@@ -413,7 +413,7 @@ mod tests {
#[test]
fn uwu() {
let program = ":. add x y + x y";
let program = ": id ?. x Any -> Any x id 5";
let tokens: Vec<Token> = Tokenizer::from_str(program).unwrap().collect::<Result<_, TokenizeError>>().unwrap();