>>> S.print $ S.mapM readIORef $ S.chain (\ior -> modifyIORef ior (*100)) $ S.mapM newIORef $ each [1..6] 100 200 300 400 500 600See also chain for a variant of this which ignores the return value of the function and just uses the side effects.
>>> S.mapM_ Prelude.print $ each [1..3] 1 2 3
>>> rest <- S.mapM_ Prelude.print $ S.splitAt 3 $ each [1..10] 1 2 3 >>> S.sum rest 49 :> ()