on master help sign in
Update notes about intercalate implementation
feb44d8Harendra Kumar
src/Streamly/Prelude/Internal.hs+8−7
@@ -2105,14 +2105,15 @@ interposeBy :: (IsStream t, Monad m)
2105 => (a -> a -> Ordering) -> t m a -> t m a -> t m a
2105 => (a -> a -> Ordering) -> t m a -> t m a -> t m a
2106interposeBy = undefined
2106interposeBy = undefined
2107
2107
2108−-- XXX shall we intercalate an Array instead? A stream is exhaustible and
2108+-- | Insert a stream between segements of streams and flatten.
2109−-- should be used only once unless it is a pure stream. or we can have
2110−-- intercalateN to intercalate n elements from the input stream at a time and
2111−-- generate the stream by cycling the array.
2112−--
2113−-- | A generalization of intersperseM to intersperse sequences.
2114−intercalate :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
2109+intercalate :: (IsStream t, MonadAsync m)
2110+ => SerialT Identity b -> (a -> t m b) -> t m a -> t m b
2115intercalate = undefined
2111intercalate = undefined
2112+
2113+-- | Insert a stream after segements of streams and flatten.
2114+intercalatePost :: (IsStream t, MonadAsync m)
2115+ => SerialT Identity b -> (a -> t m b) -> t m a -> t m b
2116+intercalatePost = undefined
2116-}
2117-}
2117
2118
2118------------------------------------------------------------------------------
2119------------------------------------------------------------------------------