Execute a Markov algorithm: Difference between revisions
→{{header|Kotlin}}: Changed 'do' loop to avoid use of label + removed surplus whitespace
(Added Kotlin) |
(→{{header|Kotlin}}: Changed 'do' loop to avoid use of label + removed surplus whitespace) |
||
Line 2,146:
captures.add(groups)
}
}
var test = origTest
val copy = test
for (c in captures) {
test = test.replace(c[0], c[2])
if (c[1] == ".") break
if (test != copy)
}
▲ break
}
while (
println("$origTest\n$test\n")
}
}</lang>
|