| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | GHC2021 | 
Fold.Pure.Run
Documentation
run :: Foldable f => Fold a b -> f a -> b Source #
Fold a listlike container to a single summary result
run monoid ["a", "b", "c"] = "abc"
scan :: Foldable f => Fold a b -> f a -> [b] Source #
Rather than only obtain a single final result, scanning gives a running total that shows the intermediate result at each step along the way
scan monoid ["a", "b", "c"] = ["","a","ab","abc"]