Execute Brain****/Raku: Difference between revisions
m
Fixed syntax highlighting and added line numbers.
(constructor can't initialize a private variable for some reason) |
m (Fixed syntax highlighting and added line numbers.) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1:
{{works with|Rakudo|2018.03}}
<syntaxhighlight lang="raku"
has @.code;
has @!mem;
Line 8 ⟶ 9:
method new (Str $code) {
BFInterpreter.bless(
}
Line 46 ⟶ 47:
}
}
}
# Test: "Hello World" program:
[>+++++++>++++++++++>+++>+<<<<-]
>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.
Line 55 ⟶ 57:
my $bfi = BFInterpreter.new($code);
$bfi.run;</syntaxhighlight>
|