. .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Iteratees – 3x faster def splitWords ( t e x t : S t r i n g ) : L i s t [ S t r i n g ] = t e x t . f i l t e r ( acceptedChars ) . toLowerCase . s p l i t (”\\W” ) . t o L i s t v a l words : Process [ String , S t r i n g ] = ( f o r { s ← await [ S t r i n g ] _ ← traversePlan_ ( splitWords ( s ) ) ( emit ) } y i e l d ( ) ) r e p e a t e d l y def wordCount ( path : S t r i n g ) = g e t F i l e L i n e s (new F i l e ( path ) , ( id s p l i t words ) outmap ( _. f o l d ( l ⇒ (1 , Map. empty [ String , I n t ] ) , w ⇒ (0 , Map(w → 1 ) ) ) ) ) execute George Leontiev deltamethod GmbH Scala solution