@@ -82,17 +82,10 @@ module Streamly.Internal.Data.Stream.StreamD.Transform
8282 , zipWith
8383 , zipWithM
8484
85− -- * Comparisons
86− , eqBy
87− , cmpBy
88−
8985 -- * Merging
9086 , mergeBy
9187 , mergeByM
9288
93− -- * Transformation comprehensions
94− , the
95−
9689 -- * Concurrent Application
9790 , mkParallel
9891 , mkParallelD
@@ -871,28 +864,6 @@ mergeBy
871864 => (a -> a -> Ordering) -> Stream m a -> Stream m a -> Stream m a
872865mergeBy cmp = mergeByM (\a b -> return $ cmp a b)
873866
874−------------------------------------------------------------------------------
875−-- Transformation comprehensions
876−------------------------------------------------------------------------------
877−
878−{-# INLINE_NORMAL the #-}
879−the :: (Eq a, Monad m) => Stream m a -> m (Maybe a)
880−the (Stream step state) = go state
881− where
882− go st = do
883− r <- step defState st
884− case r of
885− Yield x s -> go' x s
886− Skip s -> go s
887− Stop -> return Nothing
888− go' n st = do
889− r <- step defState st
890− case r of
891− Yield x s | x == n -> go' n s
892− | otherwise -> return Nothing
893− Skip s -> go' n s
894− Stop -> return (Just n)
895−
896867-------------------------------------------------------------------------------
897868-- Concurrent application and fold
898869-------------------------------------------------------------------------------