Reference implementation by Joep Schuurkes: https://smallsheds.garden/counterstring/
Joep also inspired this kata at SocratesFR 2025. You can find his repository with multiple different language starters at https://codeberg.org/joeposaurus/counterstring-codekata
Counterstrings are strings that tell you how long they are. For example a counterstring with length 9 looks like this: 3579*. Each number tells you the position of the asterisk (*) following the number.
Examples:
- counterstring(1) = *
- counterstring(2) = 2*
- counterstring(3) = 3
- counterstring(4) = 24
- counterstring(9) = 3579*
- counterstring(10) = 35710*
Applying "baby steps" or the "TDD as if you meant it" constraints works wonders for this code kata.