tokens isSpace = words
>>> words "Lorem ipsum\ndolor" ["Lorem","ipsum","dolor"]
>>> putDoc (tupled (words "Lorem ipsum dolor")) (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"
words = S.words A.write
>>> Stream.fold Fold.toList $ Unicode.words $ Stream.fromList "A newline\nis considered white space?" [fromList "A",fromList "newline",fromList "is",fromList "considered",fromList "white",fromList "space?"]
>>> Stream.fold Fold.toList $ words Fold.toList (Stream.fromList "fold these words") ["fold","these","words"]
words = Stream.wordsBy isSpacePre-release