Execute HQ9+: Difference between revisions

Content added Content deleted
(Added Kotlin)
(→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details)
Line 1,029: Line 1,029:
sb2.toString()
sb2.toString()
}
}

'+' -> { acc++; "" } // yeah, it's weird!
'+' -> { acc++; "" } // yeah, it's weird!
else -> throw IllegalArgumentException("Code contains illegal operation '$c'")
else -> throw IllegalArgumentException("Code contains illegal operation '$c'")
}
}
)
)
}
}
println(sb)
println(sb)