Eval's integer representation is now its length
- consistency with other types
This commit is contained in:
parent
1c8722ba99
commit
e30eef32b5
|
@ -98,7 +98,7 @@ impl Value {
|
||||||
tape_len,
|
tape_len,
|
||||||
} => (instructions.len() + tape_len) as _,
|
} => (instructions.len() + tape_len) as _,
|
||||||
Functio::AbleFunctio { params, body } => (params.len() + body.len()) as _,
|
Functio::AbleFunctio { params, body } => (params.len() + body.len()) as _,
|
||||||
Functio::Eval(s) => s.parse().unwrap_or(consts::ANSWER),
|
Functio::Eval(s) => s.len() as _,
|
||||||
},
|
},
|
||||||
Value::Int(i) => i,
|
Value::Int(i) => i,
|
||||||
Value::Nul => consts::ANSWER,
|
Value::Nul => consts::ANSWER,
|
||||||
|
|
Loading…
Reference in a new issue