id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

Collection TransformationsChain1

prev  |  next  |  chance

fun chain1(s: String): String =
  s.asSequence()
    .map { it.uppercase() }
    .filter { it in ("A".."F") }
    .map { it.lowercase() }
    .joinToString(", ")

Function Call  Return Value
chain1("BIKE")
chain1("Elephant")
chain1("garage")
chain1("DECK")
chain1("House")

Experiment with this code on Gitpod.io or as a Kotlin Playground

⬅ Back