Implemented not for built-in functios

pull/3/head
ondra05 2022-02-13 00:07:23 +01:00
parent 6f489d5435
commit 785bce3095
1 changed files with 7 additions and 1 deletions

View File

@ -838,7 +838,13 @@ impl ops::Not for Value {
Functio::Able { params, body }
}
Functio::Builtin(_) => todo!(),
Functio::Builtin(b) => {
let arity = b.arity;
Functio::Builtin(BuiltinFunctio::new(
move |args| b.call(&args.iter().cloned().rev().collect::<Vec<_>>()),
arity,
))
}
Functio::Chain { functios, kind } => {
let (a, b) = *functios;
Functio::Chain {