Skip to content

Commit

Permalink
Merge pull request #26 from robrix/quaternary-application
Browse files Browse the repository at this point in the history
Backward quaternary function application.
  • Loading branch information
robrix committed Feb 1, 2015
2 parents 3baccf2 + 612ba23 commit dcd04cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Prelude/Application.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@ public func <| <T, U, V> (left: (T, U) -> V, right: T) -> U -> V {
public func <| <T, U, V, W> (left: (T, U, V) -> W, right: T) -> (U, V) -> W {
return { left(right, $0, $1) }
}

/// Backward quaternary function application.
///
/// Applies the function on the left to the value on the right, returning a binary function.
public func <| <T, U, V, W, X> (left: (T, U, V, W) -> X, right: T) -> (U, V, W) -> X {
return { left(right, $0, $1, $2) }
}

0 comments on commit dcd04cb

Please sign in to comment.