TracedT

public final class TracedT<M, W, A> : TracedTOf<M, W, A>

The cowriter Comonad Transformer. This Comonad Transformer extends the context of a value in the base Comonad so that the value depends on a monoidal position.

  • Function to access values relative to a monoidal position, in the context of the base Comonad.

    Declaration

    Swift

    public let value: Kind<W, (M) -> A>
  • Safe downcast.

    Declaration

    Swift

    public static func fix(_ fa: TracedTOf<M, W, A>) -> TracedT<M, W, A>

    Parameters

    fa

    Value in the higher-kind form.

    Return Value

    Value cast to TracedT.

  • Initializes a TracedT value.

    Declaration

    Swift

    public init(_ value: Kind<W, (M) -> A>)

    Parameters

    value

    Function in the context of the base Comonad.

  • Initializes a Traced value.

    Declaration

    Swift

    public convenience init(_ f: @escaping (M) -> A)

    Parameters

    f

    Function to access values from a monoidal position.

  • Invokes this function.

    Declaration

    Swift

    public func callAsFunction(_ input: M) -> A

    Parameters

    input

    Input to the function.

    Return Value

    Output of the function.