Use b-string instead of array of b-chars

This commit is contained in:
Alex Bethel 2021-12-08 14:39:04 -07:00
parent 66ceb8f8c6
commit 8993e78ee6

View file

@ -208,7 +208,7 @@ impl Value {
Value::Str(s) => Functio::Eval(s),
Value::Int(i) => Functio::BfFunctio {
instructions: {
let instruction_mappings = [b'[', b']', b'+', b'-', b',', b'.', b'<', b'>'];
let instruction_mappings = b"[]+-,.<>";
std::iter::successors(Some(i as usize), |i| {
Some(i / instruction_mappings.len())
})