From c92cb7e8189fe2e14c9c26f94359fe96e4d409a4 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 9 Dec 2021 00:38:36 +0100 Subject: [PATCH] Who cares about the content, we have 256 commits! And I readded a thing --- ablescript/src/variables.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ablescript/src/variables.rs b/ablescript/src/variables.rs index cd0bd3a5..96c963dc 100644 --- a/ablescript/src/variables.rs +++ b/ablescript/src/variables.rs @@ -118,6 +118,20 @@ impl Value { tape_len, } => (instructions.len() + tape_len) as _, Functio::Able { params, body } => (params.len() + format!("{:?}", body).len()) as _, + Functio::Chain { functios, kind } => { + let (lhs, rhs) = *functios; + match kind { + FunctioChainKind::Ordered => { + Value::Int(Value::Functio(lhs).into_i32()) + + Value::Int(Value::Functio(rhs).into_i32()) + } + FunctioChainKind::Interlaced => { + Value::Int(Value::Functio(lhs).into_i32()) + * Value::Int(Value::Functio(rhs).into_i32()) + } + } + .into_i32() + } Functio::Eval(s) => s.len() as _, }, Value::Int(i) => i,