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. Subject to array fusion.
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
The concatenation of all the elements of a container of lists.
Flatten all Foldable elements flowing downstream
Concatenate bytearray into a larger bytearray
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
Synonym for oconcat
Flatten the structure.
O(n) Concatenate a stream of byte streams.
concat = mconcat
Concat a list of YiStrings.