tokens isSpace = words
>>> putDoc (tupled (words "Lorem ipsum dolor")) (Lorem, ipsum, dolor)
>>> words "Lorem ipsum\ndolor" ["Lorem","ipsum","dolor"]
ghci> is <- Streams.fromList ["Hello, world!"] >>= Streams.words ghci> replicateM 3 (Streams.read is) [Just "Hello,", Just "world!", Nothing]Note that this may increase the chunk size if the input contains extremely long words.
> words "abc def ghi" ["abc","def","ghi"]
words "Hello Foundation"
wordsBy (=='x') "dogxxxcatxbirdxx" == ["dog","cat","bird"]