mirror of
https://github.com/composewell/streamly.git
synced 2024-10-05 23:37:43 +03:00
Rename scanlMaybe to postscanlMaybe
This commit is contained in:
parent
785261a00e
commit
e1e77610f5
@ -68,7 +68,7 @@ module Streamly.Internal.Data.Stream.Transform
|
||||
-- * Filtering
|
||||
-- | Produce a subset of the stream.
|
||||
, with
|
||||
, scanlMaybe
|
||||
, postscanlMaybe
|
||||
, filter
|
||||
, filterM
|
||||
, deleteBy -- deleteOnceBy?
|
||||
@ -1949,13 +1949,13 @@ catMaybes (Stream step state) = Stream step1 state
|
||||
|
||||
-- | Use a filtering scan on a stream.
|
||||
--
|
||||
-- >>> scanlMaybe f = Stream.catMaybes . Stream.postscanl f
|
||||
-- >>> postscanlMaybe f = Stream.catMaybes . Stream.postscanl f
|
||||
--
|
||||
{-# INLINE scanlMaybe #-}
|
||||
scanlMaybe :: Monad m => Scanl m a (Maybe b) -> Stream m a -> Stream m b
|
||||
scanlMaybe f = catMaybes . postscanl f
|
||||
{-# INLINE postscanlMaybe #-}
|
||||
postscanlMaybe :: Monad m => Scanl m a (Maybe b) -> Stream m a -> Stream m b
|
||||
postscanlMaybe f = catMaybes . postscanl f
|
||||
|
||||
{-# DEPRECATED scanMaybe "Use scanlMaybe instead" #-}
|
||||
{-# DEPRECATED scanMaybe "Use postscanlMaybe instead" #-}
|
||||
{-# INLINE scanMaybe #-}
|
||||
scanMaybe :: Monad m => Fold m a (Maybe b) -> Stream m a -> Stream m b
|
||||
scanMaybe f = catMaybes . postscan f
|
||||
|
Loading…
Reference in New Issue
Block a user