>>> Stream.toList $ Stream.intersperse ',' $ Stream.fromList "hello" "h,e,l,l,o"
>>> Stream.toList $ Stream.trace putChar $ Stream.intersperseM (putChar '.' >> return ',') $ Stream.fromList "hello" h.,e.,l.,l.,o"h,e,l,l,o"Be careful about the order of effects. In the above example we used trace after the intersperse, if we use it before the intersperse the output would be he.l.l.o."h,e,l,l,o".
>>> Stream.toList $ Stream.intersperseM (putChar '.' >> return ',') $ Stream.trace putChar $ Stream.fromList "hello" he.l.l.o."h,e,l,l,o"
>>> Stream.toList $ Stream.trace putChar $ Stream.intersperseMPrefix_ (putChar '.' >> return ',') $ Stream.fromList "hello" .h.e.l.l.o"hello"Same as trace_ but may be concurrent. Concurrent Pre-release
>>> Stream.toList $ Stream.trace putChar $ intersperseMSuffix (putChar '.' >> return ',') $ Stream.fromList "hello" h.,e.,l.,l.,o.,"h,e,l,l,o,"Pre-release
>>> Stream.toList $ Stream.intersperseMSuffixWith 2 (return ',') $ Stream.fromList "hello" "he,ll,o,"Pre-release
>>> Stream.mapM_ putChar $ Stream.intersperseMSuffix_ (threadDelay 1000000) $ Stream.fromList "hello" helloPre-release
> Stream.toList $ Stream.intersperseMWith 2 (return ',') $ Stream.fromList "hello" "he,ll,o"Unimplemented
>>> Stream.drain $ Stream.trace putChar $ Stream.intersperseM_ (putChar '.') $ Stream.fromList "hello" h.e.l.l.oPre-release