Vocabularysequences.
extrasInputsOutputsWord descriptionGenerate a new sequence where all runs of elements for which the predicate returns true are replaced by a single instance of
elt.
See alsocompactExamplesCollapse multiple spaces in a string down to a single space
USING: kernel prettyprint sequences.extras ;
" Hello, crazy world " [ CHAR: \s = ] " " collapse .
" Hello, crazy world "
Definition