Skip to content

Commit

Permalink
Add Lens operators
Browse files Browse the repository at this point in the history
  • Loading branch information
CodaFi committed Jul 8, 2015
1 parent 1e54027 commit 45965bd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Operators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ infix operator ->> {
precedence 110
}

/// Imap | Maps covariantly over the index of a right-leaning bifunctor.
infix operator <^^> {
associativity left
precedence 140
}

/// Contramap | Contravariantly maps a function over the value encapsulated by a functor.
infix operator <!> {
associativity left
precedence 140
}

/// MARK: Data.Result

/// From | Creates a Result given a function that can possibly fail with an error.
Expand Down

0 comments on commit 45965bd

Please sign in to comment.