Monad

public protocol Monad : Applicative

Undocumented

  • Undocumented

    Declaration

    Swift

    static func flatMap<A, B>(_ fa: Kind<Self, A>, _ f: @escaping (A) -> Kind<Self, B>) -> Kind<Self, B>
  • Undocumented

    Declaration

    Swift

    static func tailRecM<A, B>(_ a: A, _ f : @escaping (A) -> Kind<Self, Either<A, B>>) -> Kind<Self, B>
  • ap(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func ap<A, B>(_ ff: Kind<Self, (A) -> B>, _ fa: Kind<Self, A>) -> Kind<Self, B>
  • flatten(_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func flatten<A>(_ ffa: Kind<Self, Kind<Self, A>>) -> Kind<Self, A>
  • followedBy(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func followedBy<A, B>(_ fa: Kind<Self, A>, _ fb: Kind<Self, B>) -> Kind<Self, B>
  • followedByEval(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func followedByEval<A, B>(_ fa: Kind<Self, A>, _ fb: Eval<Kind<Self, B>>) -> Kind<Self, B>
  • forEffect(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func forEffect<A, B>(_ fa: Kind<Self, A>, _ fb: Kind<Self, B>) -> Kind<Self, A>
  • forEffectEval(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func forEffectEval<A, B>(_ fa: Kind<Self, A>, _ fb: Eval<Kind<Self, B>>) -> Kind<Self, A>
  • mproduct(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func mproduct<A, B>(_ fa: Kind<Self, A>, _ f: @escaping (A) -> Kind<Self, B>) -> Kind<Self, (A, B)>
  • ifM(_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func ifM<B>(_ fa: Kind<Self, Bool>, _ ifTrue: @escaping () -> Kind<Self, B>, _ ifFalse: @escaping () -> Kind<Self, B>) -> Kind<Self, B>
  • binding(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C>(_ f: () -> Kind<Self, B>,
                              _ fb: @escaping (B) -> Kind<Self, C>) -> Kind<Self, C>
  • binding(_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C, D>(_ f: () -> Kind<Self, B>,
                                 _ fb: @escaping (B) -> Kind<Self, C>,
                                 _ fc: @escaping (B, C) -> Kind<Self, D>) -> Kind<Self, D>
  • binding(_:_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C, D, E>(_ f: () -> Kind<Self, B>,
                                    _ fb: @escaping (B) -> Kind<Self, C>,
                                    _ fc: @escaping (B, C) -> Kind<Self, D>,
                                    _ fd: @escaping (B, C, D) -> Kind<Self, E>) -> Kind<Self, E>
  • binding(_:_:_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C, D, E, G>(_ f: () -> Kind<Self, B>,
                                       _ fb: @escaping (B) -> Kind<Self, C>,
                                       _ fc: @escaping (B, C) -> Kind<Self, D>,
                                       _ fd: @escaping (B, C, D) -> Kind<Self, E>,
                                       _ fe: @escaping (B, C, D, E) -> Kind<Self, G>) -> Kind<Self, G>
  • binding(_:_:_:_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C, D, E, G, H>(_ f: () -> Kind<Self, B>,
                                          _ fb: @escaping (B) -> Kind<Self, C>,
                                          _ fc: @escaping (B, C) -> Kind<Self, D>,
                                          _ fd: @escaping (B, C, D) -> Kind<Self, E>,
                                          _ fe: @escaping (B, C, D, E) -> Kind<Self, G>,
                                          _ fg: @escaping (B, C, D, E, G) -> Kind<Self, H>) -> Kind<Self, H>
  • binding(_:_:_:_:_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C, D, E, G, H, I>(_ f: () -> Kind<Self, B>,
                                             _ fb: @escaping (B) -> Kind<Self, C>,
                                             _ fc: @escaping (B, C) -> Kind<Self, D>,
                                             _ fd: @escaping (B, C, D) -> Kind<Self, E>,
                                             _ fe: @escaping (B, C, D, E) -> Kind<Self, G>,
                                             _ fg: @escaping (B, C, D, E, G) -> Kind<Self, H>,
                                             _ fh: @escaping (B, C, D, E, G, H) -> Kind<Self, I>) -> Kind<Self, I>
  • binding(_:_:_:_:_:_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C, D, E, G, H, I, J>(_ f : () -> Kind<Self, B>,
                                                _ fb: @escaping (B) -> Kind<Self, C>,
                                                _ fc: @escaping (B, C) -> Kind<Self, D>,
                                                _ fd: @escaping (B, C, D) -> Kind<Self, E>,
                                                _ fe: @escaping (B, C, D, E) -> Kind<Self, G>,
                                                _ fg: @escaping (B, C, D, E, G) -> Kind<Self, H>,
                                                _ fh: @escaping (B, C, D, E, G, H) -> Kind<Self, I>,
                                                _ fi: @escaping (B, C, D, E, G, H, I) -> Kind<Self, J>) -> Kind<Self, J>
  • binding(_:_:_:_:_:_:_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func binding<B, C, D, E, G, H, I, J, K>(_ f: () -> Kind<Self, B>,
                                                   _ fb: @escaping (B) -> Kind<Self, C>,
                                                   _ fc: @escaping (B, C) -> Kind<Self, D>,
                                                   _ fd: @escaping (B, C, D) -> Kind<Self, E>,
                                                   _ fe: @escaping (B, C, D, E) -> Kind<Self, G>,
                                                   _ fg: @escaping (B, C, D, E, G) -> Kind<Self, H>,
                                                   _ fh: @escaping (B, C, D, E, G, H) -> Kind<Self, I>,
                                                   _ fi: @escaping (B, C, D, E, G, H, I) -> Kind<Self, J>,
                                                   _ fj: @escaping (B, C, D, E, G, H, I, J) -> Kind<Self, K>) -> Kind<Self, K>