@@ -142,7 +142,7 @@ partition =
142142 if odd a
143143 then Left a
144144 else Right a
145− in IP.fold $ FL.map f (FL.partition FL.sum FL.length)
145+ in IP.fold $ FL.lmap f (FL.partition FL.sum FL.length)
146146
147147{-# INLINE demuxWith #-}
148148demuxWith ::
@@ -160,7 +160,7 @@ demuxDefaultWith ::
160160 -> Map k (Fold m b b)
161161 -> SerialT m a
162162 -> m (Map k b, b)
163−demuxDefaultWith f mp = S.fold (FL.demuxDefaultWith f mp (FL.map snd FL.sum))
163+demuxDefaultWith f mp = S.fold (FL.demuxDefaultWith f mp (FL.lmap snd FL.sum))
164164
165165{-# INLINE classifyWith #-}
166166classifyWith ::
@@ -173,7 +173,7 @@ classifyWith f = S.fold (FL.classifyWith f FL.sum)
173173
174174{-# INLINE unzip #-}
175175unzip :: Monad m => SerialT m Int -> m (Int, Int)
176−unzip = IP.fold $ FL.map (\a -> (a, a)) (FL.unzip FL.sum FL.length)
176+unzip = IP.fold $ FL.lmap (\a -> (a, a)) (FL.unzip FL.sum FL.length)
177177
178178-------------------------------------------------------------------------------
179179-- Benchmarks
@@ -228,7 +228,7 @@ o_1_space_serial_elimination value =
228228 , benchIOSink
229229 value
230230 "lookup"
231− (S.fold (FL.map (\a -> (a, a)) (FL.lookup (value + 1))))
231+ (S.fold (FL.lmap (\a -> (a, a)) (FL.lookup (value + 1))))
232232 , benchIOSink
233233 value
234234 "findIndex"
@@ -252,7 +252,7 @@ o_1_space_serial_elimination value =
252252o_1_space_serial_transformation :: Int -> [Benchmark]
253253o_1_space_serial_transformation value =
254254 [ bgroup "transformation"
255− [ benchIOSink value "map" (S.fold (FL.map (+ 1) FL.drain))
255+ [ benchIOSink value "map" (S.fold (FL.lmap (+ 1) FL.drain))
256256 , let f x = if even x then Just x else Nothing
257257 fld = FL.mapMaybe f FL.drain
258258 in benchIOSink value "mapMaybe" (S.fold fld)