Skip to content

Commit 4684b1c

Browse files
committed
Document ApplicativeOps
1 parent dc05982 commit 4684b1c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Basis/Applicative.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,19 @@ public protocol Alternative : Applicative {
6464
func many(Self) -> FLA
6565
}
6666

67+
/// Additional functions to be implemented by those types conforming to the Applicative protocol.
6768
public protocol ApplicativeOps : Applicative {
6869
typealias C
6970
typealias FC = K1<C>
7071
typealias D
7172
typealias FD = K1<D>
7273

74+
/// Lift a function to a Functorial action.
7375
class func liftA(f : A -> B) -> Self -> FB
76+
77+
/// Lift a binary function to a Functorial action.
7478
class func liftA2(f : A -> B -> C) -> Self -> FB -> FC
79+
80+
/// Lift a ternary function to a Functorial action.
7581
class func liftA3(f : A -> B -> C -> D) -> Self -> FB -> FC -> FD
7682
}

0 commit comments

Comments
 (0)