@@ -82,17 +82,10 @@ module Streamly.Internal.Data.Stream.StreamD.Transform
83 , zipWithM
83 , zipWithM
89 -- * Merging
85 -- * Merging
91 , mergeByM
87 , mergeByM
93− -- * Transformation comprehensions
96 -- * Concurrent Application
89 -- * Concurrent Application
97 , mkParallel
90 , mkParallel
98 , mkParallelD
91 , mkParallelD
@@ -871,28 +864,6 @@ mergeBy
871 => (a -> a -> Ordering) -> Stream m a -> Stream m a -> Stream m a
864 => (a -> a -> Ordering) -> Stream m a -> Stream m a -> Stream m a
872mergeBy cmp = mergeByM (\a b -> return $ cmp a b)
865mergeBy cmp = mergeByM (\a b -> return $ cmp a b)
874−------------------------------------------------------------------------------
875−-- Transformation comprehensions
876−------------------------------------------------------------------------------
878−{-# INLINE_NORMAL the #-}
879−the :: (Eq a, Monad m) => Stream m a -> m (Maybe a)
880−the (Stream step state) = go state
883− r <- step defState st
885− Yield x s -> go' x s
887− Stop -> return Nothing
889− r <- step defState st
891− Yield x s | x == n -> go' n s
892− | otherwise -> return Nothing
894− Stop -> return (Just n)
896-------------------------------------------------------------------------------
867-------------------------------------------------------------------------------
897-- Concurrent application and fold
868-- Concurrent application and fold
898-------------------------------------------------------------------------------
869-------------------------------------------------------------------------------