concat

The concatenation of all the elements of a container of lists.

Examples

Basic usage:
>>> concat (Just [1, 2, 3])
[1,2,3]
>>> concat (Left 42)
[]
>>> concat [[1, 2, 3], [4, 5], [6], []]
[1,2,3,4,5,6]
Concatenate a list of lists.
>>> concat []
[]

>>> concat [[42]]
[42]

>>> concat [[1,2,3], [4,5], [6], []]
[1,2,3,4,5,6]
O(n) Concatenate a list of ByteStrings.
O(n) Concatenate a list of Texts.
O(n) Concatenate a list of streams. Properties
unstream . concat . fmap stream  = concat
O(n) Concatenate all vectors in the list.
O(n) Concatenate all vectors in the list.
O(n) Concatenate all vectors in the list.
O(n) Concatenate all vectors in the list.
O(n) Concatenate all vectors in the list.
Flatten out a stream by yielding the values contained in an incoming MonoFoldable as individually yielded values. Subject to fusion
Generalization of catMaybes. It puts all values from Foldable into stream. Subject to fusion Since 1.0.6
Concatenate bytearray into a larger bytearray
Flatten all Foldable elements flowing downstream
concat xss is a DList representing the concatenation of all DLists in the list xss. <math>(length xss). concat obeys the law:
toList (concat xss) = concat (map toList xss)
A fold over append.
Make a stream of foldable containers into a stream of their separate elements. This is just
concat str = for str each
>>> S.print $ S.concat (each ["xy","z"])
'x'
'y'
'z'
Note that it also has the effect of catMaybes, rights map snd and such-like operations.
>>> S.print $ S.concat $ S.each [Just 1, Nothing, Just 2]
1
2

>>> S.print $  S.concat $ S.each [Right 1, Left "Error!", Right 2]
1
2

>>> S.print $ S.concat $ S.each [('A',1), ('B',2)]
1
2
The concatenation of all the elements of a container of lists.
O(n) Concatenate all vectors in the list
O(n) Concatenate all vectors in the list
O(n) Concatenate all vectors in the list
O(n) Concatenate all vectors in the list
Synonym for oconcat
Concatenate list of ShortTexts This is a type-specialised alias of mconcat.
>>> concat []
""
>>> concat ["foo","bar","doo"]
"foobardoo"