Skip to content

Commit

Permalink
Merge pull request #206 from antitypical/deprecate-operators
Browse files Browse the repository at this point in the history
Deprecate `>>-` and `&&&` operators
  • Loading branch information
mdiep authored Dec 30, 2016
2 parents 0577b76 + 28e6f36 commit f5b14b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Result/ResultProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public extension ResultProtocol where Error: ErrorProtocolConvertible {
infix operator &&& : LogicalConjunctionPrecedence

/// Returns a Result with a tuple of `left` and `right` values if both are `Success`es, or re-wrapping the error of the earlier `Failure`.
@available(*, deprecated, renamed: "ResultProtocol.fanout(self:_:)")
public func &&& <L: ResultProtocol, R: ResultProtocol> (left: L, right: @autoclosure () -> R) -> Result<(L.Value, R.Value), L.Error>
where L.Error == R.Error
{
Expand All @@ -140,6 +141,7 @@ infix operator >>- : ChainingPrecedence
/// Returns the result of applying `transform` to `Success`es’ values, or re-wrapping `Failure`’s errors.
///
/// This is a synonym for `flatMap`.
@available(*, deprecated, renamed: "ResultProtocol.flatMap(self:_:)")
public func >>- <T: ResultProtocol, U> (result: T, transform: (T.Value) -> Result<U, T.Error>) -> Result<U, T.Error> {
return result.flatMap(transform)
}
Expand Down

0 comments on commit f5b14b3

Please sign in to comment.