Execute a Markov algorithm: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: .perl not needed) |
||
Line 3,794: | Line 3,794: | ||
=={{header|Raku}}== |
=={{header|Raku}}== |
||
(formerly Perl 6) |
(formerly Perl 6) |
||
Run this without arguments and it will scan the cwd for rules.* files and their corresponding test.*. |
Run this without arguments and it will scan the cwd for rules.* files and their corresponding test.*. |
||
Line 3,847: | Line 3,846: | ||
my $ruleset = slurp($rulefile); |
my $ruleset = slurp($rulefile); |
||
say $start_value |
say $start_value; |
||
say run(:$ruleset, :$start_value, :$verbose) |
say run(:$ruleset, :$start_value, :$verbose); |
||
say ''; |
say ''; |
||
} |
} |
||
Line 3,856: | Line 3,855: | ||
my $ruleset = slurp($rulefile); |
my $ruleset = slurp($rulefile); |
||
my $start_value = slurp($input).trim-trailing; |
my $start_value = slurp($input).trim-trailing; |
||
say "starting with $start_value |
say "starting with: $start_value"; |
||
say run(:$ruleset, :$start_value, :$verbose) |
say run(:$ruleset, :$start_value, :$verbose); |
||
} |
} |
||
Line 3,863: | Line 3,862: | ||
my $ruleset = slurp($rulefile); |
my $ruleset = slurp($rulefile); |
||
my $start_value = @pieces.join(" "); |
my $start_value = @pieces.join(" "); |
||
say "starting with $start_value |
say "starting with: $start_value"; |
||
say run(:$ruleset, :$start_value, :$verbose) |
say run(:$ruleset, :$start_value, :$verbose); |
||
}</lang> |
}</lang> |
||