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
>>> S.mconcat $ S.take 2 $ S.map (Data.Monoid.Last . Just) S.stdinLn first<Enter> last<Enter> Last {getLast = Just "last"} :> ()