Skip to content

Instantly share code, notes, and snippets.

@marianosimone
Created August 8, 2018 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marianosimone/0c33f2da36275ae555307d184b2a580f to your computer and use it in GitHub Desktop.
Save marianosimone/0c33f2da36275ae555307d184b2a580f to your computer and use it in GitHub Desktop.
example 5 [java is dead, long live Kotlin - 2018-08 post@thumbtack]
val notEmptyStrings = mutableListOf<String>()
allTheStrings.forEach {
if (it.isNotEmpty()) {
notEmptyStrings.add(it)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment