The Diamond Kata
A 2nd stab in Kotlin, this time spending more time on writing smaller unit tests to get number of spaces required and then generated those spaces.
What this means is that it prevents a simplification that can be made unless a test is removed.
May be more succint with a functional style.