@@ -99,6 +99,8 @@ module Streamly.Prelude
102 , maximum
104 , maximum
103 , minimum
105 , minimum
@@ -168,7 +170,7 @@ import Prelude
168 hiding (filter, drop, dropWhile, take, takeWhile, zipWith, foldr,
170 hiding (filter, drop, dropWhile, take, takeWhile, zipWith, foldr,
169 foldl, map, mapM, mapM_, sequence, all, any, sum, product, elem,
171 foldl, map, mapM, mapM_, sequence, all, any, sum, product, elem,
170 notElem, maximum, minimum, head, last, tail, length, null,
172 notElem, maximum, minimum, head, last, tail, length, null,
171− reverse, iterate, init)
173+ reverse, iterate, init, and, or)
172import qualified Prelude
174import qualified Prelude
173import qualified System.IO as IO
175import qualified System.IO as IO
@@ -572,6 +574,16 @@ all p m = S.all p (toStreamS m)
572any :: Monad m => (a -> Bool) -> SerialT m a -> m Bool
574any :: Monad m => (a -> Bool) -> SerialT m a -> m Bool
573any p m = S.any p (toStreamS m)
575any p m = S.any p (toStreamS m)
577+-- | Determines if all elements of a boolean stream are True.
579+and :: Monad m => SerialT m Bool -> m Bool
582+-- | Determines wheter at least one element of a boolean stream is True.
584+or :: Monad m => SerialT m Bool -> m Bool
575-- | Determine the sum of all elements of a stream of numbers
587-- | Determine the sum of all elements of a stream of numbers
577-- @since 0.1.0
589-- @since 0.1.0