@@ -167,20 +167,20 @@ stripStart = S.dropWhile isSpace
167-- | Fold each line of the stream using the supplied Fold
167-- | Fold each line of the stream using the supplied Fold
168-- and stream the result.
168-- and stream the result.
170−-- >>> S.toList $ foldLines (S.fromList "lines\nthis\nstring\n\n\n") FL.toList
170+-- >>> S.toList $ foldLines FL.toList (S.fromList "lines\nthis\nstring\n\n\n")
171-- ["lines", "this", "string", "", ""]
171-- ["lines", "this", "string", "", ""]
172{-# INLINE foldLines #-}
172{-# INLINE foldLines #-}
173−foldLines :: (Monad m, IsStream t) => t m Char -> Fold m Char b -> t m b
173+foldLines :: (Monad m, IsStream t) => Fold m Char b -> t m Char -> t m b
174−foldLines = flip (S.splitOnSuffix (== '\n'))
174+foldLines = S.splitOnSuffix (== '\n')
176-- | Fold each word of the stream using the supplied Fold
176-- | Fold each word of the stream using the supplied Fold
177-- and stream the result.
177-- and stream the result.
179−-- >>> S.toList $ foldWords (S.fromList "fold these words") FL.toList
179+-- >>> S.toList $ foldWords FL.toList (S.fromList "fold these words")
180-- ["fold", "these", "words"]
180-- ["fold", "these", "words"]
181{-# INLINE foldWords #-}
181{-# INLINE foldWords #-}
182−foldWords :: (Monad m, IsStream t) => t m Char -> Fold m Char b -> t m b
182+foldWords :: (Monad m, IsStream t) => Fold m Char b -> t m Char -> t m b
183−foldWords = flip (S.wordsBy isSpace)
183+foldWords = S.wordsBy isSpace
185foreign import ccall unsafe "u_iswspace"
185foreign import ccall unsafe "u_iswspace"
186 iswspace :: Int -> Int
186 iswspace :: Int -> Int