Cofree

public class Cofree<S, A> : CofreeOf<S, A>

Undocumented

  • Undocumented

    Declaration

    Swift

    public static func fix(_ fa: CofreeOf<S, A>) -> Cofree<S, A>
  • Undocumented

    Declaration

    Swift

    public init(_ head: A, _ tail: Eval<CofreeEval<S, A>>)
  • Undocumented

    Declaration

    Swift

    public func tailForced() -> CofreeEval<S, A>
  • Undocumented

    Declaration

    Swift

    public func mapBranchingRoot<FuncK>(_ functionK: FuncK) -> Cofree<S, A> where S == FuncK.F, FuncK : FunctionK, FuncK.F == FuncK.G
  • Undocumented

    Declaration

    Swift

    public func runTail() -> Cofree<S, A>
  • Undocumented

    Declaration

    Swift

    public static func unfold(_ a: A, _ f: @escaping (A) -> Kind<S, A>) -> Cofree<S, A>
  • Undocumented

    Declaration

    Swift

    public static func create(_ a: A, _ f: @escaping (A) -> Kind<S, A>) -> Cofree<S, A>
  • Undocumented

    Declaration

    Swift

    public func transform<B>(_ f: @escaping (A) -> B, _ g: @escaping (Cofree<S, A>) -> Cofree<S, B>) -> Cofree<S, B>
  • Undocumented

    Declaration

    Swift

    public func mapBranchingS<T, FuncK>(_ functionK: FuncK) -> Cofree<T, A> where S == FuncK.F, T == FuncK.G, FuncK : FunctionK
  • Undocumented

    Declaration

    Swift

    public func mapBranchingT<T, FuncK>(_ functionK: FuncK) -> Cofree<T, A> where S == FuncK.F, T : Functor, T == FuncK.G, FuncK : FunctionK
  • Undocumented

    Declaration

    Swift

    public func run() -> Cofree<S, A>
  • Undocumented

    Declaration

    Swift

    public func cata<B>(_ folder: @escaping (A, Kind<S, B>) -> Eval<B>) -> Eval<B>
  • Undocumented

    Declaration

    Swift

    public func cataM<B, M: Monad, FuncK>(_ folder: @escaping (A, Kind<S, B>) -> Kind<M, B>, _ inclusion: FuncK) -> Kind<M, B> where FuncK: FunctionK, FuncK.F == ForEval, FuncK.G == M