@@ -335,22 +335,6 @@ import Streamly.Internal.Data.Stream.StreamD.Flatten
335import Streamly.Internal.Data.Stream.StreamD.SplitGroup
335import Streamly.Internal.Data.Stream.StreamD.SplitGroup
336import Streamly.Internal.Data.SVar
336import Streamly.Internal.Data.SVar
338−-------------------------------------------------------------------------------
340−-------------------------------------------------------------------------------
342−-- Does not fuse, has the same performance as the StreamK version.
343−{-# INLINE_NORMAL uncons #-}
344−uncons :: Monad m => Stream m a -> m (Maybe (a, Stream m a))
345−uncons (UnStream step state) = go state
348− r <- step defState st
350− Yield x s -> return $ Just (x, Stream step s)
352− Stop -> return Nothing
354-------------------------------------------------------------------------------
338-------------------------------------------------------------------------------
355-- Hoisting the inner monad
339-- Hoisting the inner monad
356-------------------------------------------------------------------------------
340-------------------------------------------------------------------------------
@@ -423,22 +407,6 @@ runStateT initial (Stream step state) = Stream step' (state, initial)
423 Skip s -> Skip (s, return sv')
407 Skip s -> Skip (s, return sv')
424 Stop -> Stop
408 Stop -> Stop
426−------------------------------------------------------------------------------
427−-- Elimination by Folds
428−------------------------------------------------------------------------------
430−------------------------------------------------------------------------------
432−------------------------------------------------------------------------------
434−{-# INLINE_NORMAL foldr1 #-}
435−foldr1 :: Monad m => (a -> a -> a) -> Stream m a -> m (Maybe a)
439− Nothing -> return Nothing
440− Just (h, t) -> fmap Just (foldr f h t)
442------------------------------------------------------------------------------
410------------------------------------------------------------------------------
443-- Substreams
411-- Substreams
444------------------------------------------------------------------------------
412------------------------------------------------------------------------------