Implemented not for built-in functios

This commit is contained in:
Erin 2022-02-13 00:07:23 +01:00 committed by ondra05
parent aa94ae57d8
commit 5d5c66fb3c

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 {