Execute a Markov algorithm: Difference between revisions

→‎{{header|D}}: move copy out of loop
(→‎{{header|D}}: improved regex to filter out comments)
(→‎{{header|D}}: move copy out of loop)
Line 960:
}
redo:
auto copy = tests[i].idup;
foreach (c; capt) {
auto copy = tests[i].idup;
tests[i] = replace(tests[i], c[0], c[2]);
if (c[1] == ".") break;
Anonymous user