- 
                  
                  
Safe downcast.
Declaration
Swift
public static func fix(_ fa: WriterTOf<F, W, A>) -> WriterT<F, W, A>Parameters
faValue in the higher-kind form.
Return Value
Value cast to WriterT.
 - 
                  
                  
Initializes a
WriterT.Declaration
Swift
public init(_ value: Kind<F, (W, A)>)Parameters
valueA pair of accumulator and value wrapped in an effect.
 - 
                  
                  
Provides the values wrapped in this WriterT
Declaration
Swift
public var runT: Kind<F, (W, A)> { get } 
- 
                  
                  
Initializes a
Writer.Declaration
Swift
public convenience init(_ value: (W, A))Parameters
valueA pair of accumulator and value.
 - 
                  
                  
Initializes a
Writer.Declaration
Swift
public convenience init(_ w: W, _ a: A)Parameters
wThe accumulator initial value.
aThe initial value.
 - 
                  
                  
Provides the values wrapped in this Writer
Declaration
Swift
public var run: (W, A) { get } - 
                  
                  
The first element of the pair.
Declaration
Swift
public var first: W { get } - 
                  
                  
The second element of the pair.
Declaration
Swift
public var second: A { get } 
- 
                  
                  
Adds an accumulated value to an effect.
Declaration
Swift
public static func putT(_ fa: Kind<F, A>, _ w: W) -> WriterT<F, W, A>Parameters
faA value wrapped in an effect.
wA value for the accumulator.
Return Value
A
WriterTwhere the effect wraps the original value with the accumulator. - 
                  
                  
Obtains an effect with the result value.
Declaration
Swift
public func content() -> Kind<F, A>Return Value
Effect with the result value.
 - 
                  
                  
Obtains an effect with the accumulator value.
Declaration
Swift
public func written() -> Kind<F, W>Return Value
Effect with the accumulator value.
 
Functions for WriterT when the effect has an instance of Functor and the accumulator type has an instance of Monoid
- 
                  
                  
Creates a
WriterTfrom values for the result and accumulator.Declaration
Swift
public static func both(_ w: W, _ a: A) -> WriterT<F, W, A>Parameters
wInitial value for the accumulator.
aInitial value for the result.
Return Value
A
WriterTwrapping the provided values in an effect. - 
                  
                  
Creates a
WriterTfrom a tuple.Declaration
Swift
public static func fromTuple(_ z: (W, A)) -> WriterT<F, W, A>Parameters
zA tuple where the first component is used for the accumulator and the second for the result value.
Return Value
A
WriterTwrapping the provided values in an effect. - 
                  
                  
Creates a
WriterTfrom values for the result and accumulator.Declaration
Swift
public static func put(_ a: A, _ w: W) -> WriterT<F, W, A>Parameters
aInitial value for the result.
wInitial value for the accumulator.
Return Value
A
WriterTwrapping the provided values in an effect. - 
                  
                  
Lifts an effect using the accumulator value of this
WriterT.Declaration
Swift
public func liftF<B>(_ fb: Kind<F, B>) -> WriterT<F, W, B>Parameters
fbEffect to be lifted.
Return Value
A
WriterTwrapping the value contained in the effect parameter and using the accumulator of thisWriterT. 
Functions for WriterT when the effect has an instance of Applicative and the accumulator type has an instance of Monoid
- 
                  
                  
Creates a
WriterTfrom an initial value for the result.Declaration
Swift
public static func value(_ a: A) -> WriterT<F, W, A>Parameters
aInitial value for the result.
Return Value
A
WriterTwrapping the provided value and using the empty value of theMonoidfor the accumulator. 
- 
                  
                  
Transforms the accumulator and result values using a provided function.
Declaration
Swift
public func transform<B, U>(_ f: @escaping ((W, A)) -> (U, B)) -> WriterT<F, U, B>Parameters
fTransforming function.
Return Value
A
WriterTwhere the original values have been transformed using the provided function. - 
                  
                  
Transforms the wrapped value using a provided function.
Declaration
Parameters
fTransforming function.
Return Value
A
WriterTwhere the original values have been transformed using the provided function. - 
                  
                  
Transforms the accumulator using the provided function.
Declaration
Swift
public func mapAcc<U>(_ f: @escaping (W) -> U) -> WriterT<F, U, A>Parameters
fTransforming function.
Return Value
A
WriterTwith the same result as the original one, and the transformed accumulator. - 
                  
                  
Transforms the accumulator and result values using two functions.
Declaration
Swift
public func bimap<B, U>(_ g: @escaping (W) -> U, _ f: @escaping (A) -> B) -> WriterT<F, U, B>Parameters
gTransforming function for the accumulator.
fTransforming function for the result.
Return Value
A
WriterTwhere the original values have been transformed using the provided functions. - 
                  
                  
Flatmaps the provided function to the nested tuple.
Declaration
Swift
public func subflatMap<B>(_ f: @escaping (A) -> (W, B)) -> WriterT<F, W, B>Parameters
fFunction for the flatmap operation.
Return Value
Result of flatmapping the provided function to the nested values, wrapped in the effect.
 - 
                  
                  
Swaps the result and accumulator values.
Declaration
Swift
public func swap() -> WriterT<F, A, W>Return Value
A
WriterTwhere the accumulator is the original result value and vice versa. - 
                  
                  
Runs this effect and pairs the result with the accumulator for a new result.
Declaration
Swift
public func listen() -> WriterTOf<F, W, (W, A)>Return Value
A
WriterTwhere the result is paired with the accumulator. 
Functions for WriterT when the effect has an instance of Monad and the accumulator type has an instance of Monoid
- 
                  
                  
Flatmaps a function that produces an effect and lifts it back to
WriterT.Declaration
Swift
public func semiflatMap<B>(_ f: @escaping (A) -> Kind<F, B>) -> WriterT<F, W, B>Parameters
fA function producing an effect.
Return Value
Result of flatmapping and lifting the function on this value.
 - 
                  
                  
Resets the accumulator to the empty value of the
Monoid.Declaration
Swift
public func reset() -> WriterT<F, W, A>Return Value
A
WriterTvalue with an empty accumulator and the same result value. 
            
              Install in Dash
            
        WriterT Class Reference