MonadWriter
public protocol MonadWriter : Monad
A MonadWriter is a Monad with the ability to produce a stream of data in addition to the computed values.
-
Type of the side stream of data produced by this monad
Declaration
Swift
associatedtype W
-
tell(_:)Extension method -
listens(_:_:)Extension methodPerforms a computation and transforms the side stream of data, pairing it with the result of the computation.
Declaration
Parameters
faA computation.
fA function to transform the side stream of data.
Return Value
A tuple of the transformation of the side stream and the result of the computation.
-
censor(_:_:)Extension methodTransforms the side stream of data of a given computation.
Declaration
Parameters
faA computation.
fTransforming function.
Return Value
A computation with the same result as the provided one, with the transformed side stream of data.
Install in Dash
MonadWriter Protocol Reference