@@ -310,7 +310,11 @@ main = hspec $ do
310 `shouldReturn` (take 100 $ iterate (+ 1) 0)
310 `shouldReturn` (take 100 $ iterate (+ 1) 0)
312 let folded :: Streaming t => [a] -> t IO a
312 let folded :: Streaming t => [a] -> t IO a
313− folded = adapt . serially . (foldMapWith (<>) return)
313+ folded = adapt . serially . (\xs ->
315+ [x] -> return x -- singleton stream case
316+ _ -> foldMapWith (<>) return xs
314 describe "Functor operations" $ do
318 describe "Functor operations" $ do
315 functorOps A.each "serially" serially (==)
319 functorOps A.each "serially" serially (==)
316 functorOps folded "serially folded" serially (==)
320 functorOps folded "serially folded" serially (==)