Created
May 23, 2018 16:58
-
-
Save bdarfler/91a4fdbe483dab4e7a420016eb4a8dc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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