Copyright | (c) 2019 Composewell Technologies |
---|---|
License | BSD3 |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe |
Language | Haskell2010 |
Documentation
A Sink
is a special type of Fold
that does not accumulate any value,
but runs only effects. A Sink
has no state to maintain therefore can be a
bit more efficient than a Fold
with '()' as the state, especially when
Sink
s are composed with other operations. A Sink can be upgraded to a
Fold
, but a Fold
cannot be converted into a Sink.
Sink (a -> m ()) |