.
Kotlin initial code:
fun decodeBits(bits: String): String { return "." } fun decodeMorse(code: String): String { return MORSE_CODE[it] ?: "" }
It's MORSE_CODE, NOT MorseCode
MORSE_CODE
MorseCode
I am trying this Kata in Kotlin but when I run the sample and the test suite, I get the map MorseCode does not reference to anything. Seems to be not loaded / there.
src/main/kotlin/solution.kt:52:24: error: unresolved reference: MorseCode .map{ MorseCode[it] ?: "" } ^
Loading collection data...
.
Kotlin initial code:
It's
MORSE_CODE
, NOTMorseCode
I am trying this Kata in Kotlin but when I run the sample and the test suite, I get the map MorseCode does not reference to anything. Seems to be not loaded / there.