>>> concat (Just [1, 2, 3]) [1,2,3]
>>> concat (Left 42) []
>>> concat [[1, 2, 3], [4, 5], [6], []] [1,2,3,4,5,6]
>>> concat [[1,2,3], [4,5], [6], []] [1,2,3,4,5,6]
>>> concat [] []
>>> concat [[42]] [42]
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