Skip to content

Instantly share code, notes, and snippets.

@bdarfler
Created May 23, 2018 16:58
Show Gist options
  • Save bdarfler/91a4fdbe483dab4e7a420016eb4a8dc8 to your computer and use it in GitHub Desktop.
Save bdarfler/91a4fdbe483dab4e7a420016eb4a8dc8 to your computer and use it in GitHub Desktop.
val n = wordsList.length
val wLength = List.newBuilder[Int]
val wCaps = List.newBuilder[Boolean]
for( word <- wordsList ) {
 wLength += word.length
 wCaps += isCapitalized(word)
}
( wLength.result(), wCaps.result() )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment