From d634692f12ea713c87572f643a1a41a1f88d9e2c Mon Sep 17 00:00:00 2001 From: Erin Date: Sun, 13 Feb 2022 00:07:23 +0100 Subject: [PATCH] Implemented not for built-in functios --- ablescript/src/variables.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ablescript/src/variables.rs b/ablescript/src/variables.rs index e9dec5b..66c3ffc 100644 --- a/ablescript/src/variables.rs +++ b/ablescript/src/variables.rs @@ -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::>()), + arity, + )) + } Functio::Chain { functios, kind } => { let (a, b) = *functios; Functio::Chain {