words package:streamly-core

Break a string up into a stream of strings, which were delimited by characters representing white space.
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?"]
Fold each word of the stream using the supplied Fold and stream the result.
>>> Stream.fold Fold.toList $ words Fold.toList (Stream.fromList "fold these     words")
["fold","these","words"]
words = Stream.wordsBy isSpace
Pre-release
Flattens the stream of Array Char, after appending a separating space to each string. unwords is an inverse operation to words.
>>> Stream.fold Fold.toList $ Unicode.unwords $ Stream.fromList ["unwords", "this", "string"]
"unwords this string"
unwords = S.unwords A.read
Note that, in general
unwords . words /= id
Unfold the elements of a stream to character streams using the supplied Unfold and concat the results with a whitespace character infixed between the streams.
unwords = Stream.interpose ' '
unwords = Stream.intercalate Unfold.fromList " "
Pre-release