Sha256: acc6f4960b0a427bb521dbb7ee21a22eb63ee3c618fc2ced855a4f0cba306386
Contents?: true
Size: 303 Bytes
Versions: 396
Compression:
Stored size: 303 Bytes
Contents
object Raindrops { private val sounds = listOf(Pair(3, "Pling"), Pair(5, "Plang"), Pair(7, "Plong")) fun convert(n: Int): String { val result = sounds.filter { n % it.first == 0 }.map { it.second }.joinToString("") return if (result.isEmpty()) n.toString() else result } }
Version data entries
396 entries across 396 versions & 1 rubygems