Who cares about the content, we have 256 commits!

And I readded a thing
pull/1/head
ondra05 2021-12-09 00:38:36 +01:00
parent 784992e65e
commit 647fffbfd2
1 changed files with 14 additions and 0 deletions

View File

@ -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,