Skip to content

Commit 45965bd

Browse files
committed
Add Lens operators
1 parent 1e54027 commit 45965bd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Operators.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ infix operator ->> {
6060
precedence 110
6161
}
6262

63+
/// Imap | Maps covariantly over the index of a right-leaning bifunctor.
64+
infix operator <^^> {
65+
associativity left
66+
precedence 140
67+
}
68+
69+
/// Contramap | Contravariantly maps a function over the value encapsulated by a functor.
70+
infix operator <!> {
71+
associativity left
72+
precedence 140
73+
}
74+
6375
/// MARK: Data.Result
6476

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

0 commit comments

Comments
 (0)