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