@@ -15,7 +15,7 @@ import Control.Monad (when)
15import Data.Functor.Identity (Identity, runIdentity)
15import Data.Functor.Identity (Identity, runIdentity)
16import Data.Maybe (fromJust)
16import Data.Maybe (fromJust)
17import Prelude
17import Prelude
18− (Monad, Int, (+), ($), (.), return, fmap, even, (>), (<=), (==), (<=),
18+ (Monad, Int, (+), ($), (.), return, fmap, even, (>), (<=), (==), (>=),
19 subtract, undefined, Maybe(..), odd, Bool, not, (>>=), mapM_, curry,
19 subtract, undefined, Maybe(..), odd, Bool, not, (>>=), mapM_, curry,
20 maxBound, div, IO, compare)
20 maxBound, div, IO, compare)
21import qualified Prelude as P
21import qualified Prelude as P
@@ -275,7 +275,8 @@ composeN' n f =
275scan, scanl1, map, fmap, mapMaybe, filterEven, filterAllOut,
275scan, scanl1, map, fmap, mapMaybe, filterEven, filterAllOut,
276 filterAllIn, takeOne, takeAll, takeWhileTrue, takeWhileMTrue, dropOne,
276 filterAllIn, takeOne, takeAll, takeWhileTrue, takeWhileMTrue, dropOne,
277 dropAll, dropWhileTrue, dropWhileMTrue, dropWhileFalse,
277 dropAll, dropWhileTrue, dropWhileMTrue, dropWhileFalse,
278− findIndices, elemIndices
278+ findIndices, elemIndices, insertLarge, insertSmall, deleteLarge,
279 :: Monad m
280 :: Monad m
280 => Int -> Stream m Int -> m ()
281 => Int -> Stream m Int -> m ()
@@ -314,6 +315,10 @@ dropWhileMTrue n = composeN n $ S.dropWhileM (return . (<= maxValue))
314dropWhileFalse n = composeN n $ S.dropWhile (> maxValue)
315dropWhileFalse n = composeN n $ S.dropWhile (> maxValue)
315findIndices n = composeN n $ S.findIndices (== maxValue)
316findIndices n = composeN n $ S.findIndices (== maxValue)
316elemIndices n = composeN n $ S.elemIndices maxValue
317elemIndices n = composeN n $ S.elemIndices maxValue
318+insertLarge n = composeN n $ S.insertBy compare maxValue
319+insertSmall n = composeN n $ S.insertBy compare 0
320+deleteSmall n = composeN n $ S.deleteBy (==) 0
321+deleteLarge n = composeN n $ S.deleteBy (>=) maxValue
318-------------------------------------------------------------------------------
323-------------------------------------------------------------------------------
319-- Iteration
324-- Iteration