on master help sign in
Drop long-dead code
commitc5689ec53c37a761c8a3ea437c570bf332c8a5ee authorBryan O'Sullivan <bos@serpentine.com> dateFri 8 May 2015, 13:53 (11 years ago) parentac2644b
1 file changed−26
Data/Text/Internal/Fusion/Common.hs−26
Data/Text/Internal/Fusion/Common.hs−26
@@ -71,9 +71,6 @@ module Data.Text.Internal.Fusion.Common
7171 -- ** Scans
7272 , scanl
7373
74− -- ** Accumulating maps
75− -- , mapAccumL
76−
7774 -- ** Generation and unfolding
7875 , replicateCharI
7976 , replicateI
@@ -668,29 +665,6 @@ scanl f z0 (Stream next0 s0 len) = Stream next (Scan1 z0 s0) (len+1) -- HINT may
668665 Done -> Done
669666{-# INLINE [0] scanl #-}
670667
671−-- -----------------------------------------------------------------------------
672−-- ** Accumulating maps
673−
674−{-
675−-- | /O(n)/ Like a combination of 'map' and 'foldl'. Applies a
676−-- function to each element of a stream, passing an accumulating
677−-- parameter from left to right, and returns a final stream.
678−--
679−-- /Note/: Unlike the version over lists, this function does not
680−-- return a final value for the accumulator, because the nature of
681−-- streams precludes it.
682−mapAccumL :: (a -> b -> (a,b)) -> a -> Stream b -> Stream b
683−mapAccumL f z0 (Stream next0 s0 len) = Stream next (s0 :*: z0) len -- HINT depends on f
684− where
685− {-# INLINE next #-}
686− next (s :*: z) = case next0 s of
687− Yield x s' -> let (z',y) = f z x
688− in Yield y (s' :*: z')
689− Skip s' -> Skip (s' :*: z)
690− Done -> Done
691−{-# INLINE [0] mapAccumL #-}
692−-}
693−
694668-- -----------------------------------------------------------------------------
695669-- ** Generating and unfolding streams
696670