Skip to content

Commit 0cf4ba9

Browse files
committed
Associativity before Precedence, always.
1 parent 5a3a000 commit 0cf4ba9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Operators.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,57 +105,57 @@ infix operator <> {
105105
///
106106
/// This function is literally `•`, but for Categories.
107107
infix operator <<< {
108-
precedence 110
109108
associativity right
109+
precedence 110
110110
}
111111

112112
/// Left-to-Right Composition | Composes two categories to form a new category with the source of
113113
/// the first category and the target of the second category.
114114
///
115115
/// Function composition with the arguments flipped.
116116
infix operator >>> {
117-
precedence 110
118117
associativity right
118+
precedence 110
119119
}
120120

121121
/// MARK: Control.Arrow
122122

123123
/// Split | Splits two computations and combines the result into one Arrow yielding a tuple of
124124
/// the result of each side.
125125
infix operator *** {
126-
precedence 130
127126
associativity right
127+
precedence 130
128128
}
129129

130130
/// Fanout | Given two functions with the same source but different targets, this function
131131
/// splits the computation and combines the result of each Arrow into a tuple of the result of
132132
/// each side.
133133
infix operator &&& {
134-
precedence 130
135134
associativity right
135+
precedence 130
136136
}
137137

138138
/// MARK: Control.Arrow.Choice
139139

140140
/// Splat | Splits two computations and combines the results into Eithers on the left and right.
141141
infix operator +++ {
142-
precedence 120
143142
associativity right
143+
precedence 120
144144
}
145145

146146
/// Fanin | Given two functions with the same target but different sources, this function splits
147147
/// the input between the two and merges the output.
148148
infix operator ||| {
149-
precedence 120
150149
associativity right
150+
precedence 120
151151
}
152152

153153
/// MARK: Control.Arrow.Plus
154154

155155
/// Op | Combines two ArrowZero monoids.
156156
infix operator <+> {
157-
precedence 150
158157
associativity right
158+
precedence 150
159159
}
160160

161161
/// MARK: Data.JSON
@@ -165,8 +165,8 @@ infix operator <+> {
165165
/// If the given keypath is not present or the retrieved value is not of the appropriate type, this
166166
/// function returns `.None`.
167167
infix operator <? {
168-
precedence 150
169168
associativity left
169+
precedence 150
170170
}
171171

172172
/// Force Retrieve | Retrieves a value from a dictionary of JSON values using a given keypath,
@@ -176,8 +176,8 @@ infix operator <? {
176176
/// function will terminate with a fatal error. It is recommended that you use Force Retrieve's
177177
/// total cousin `<?` (Retrieve).
178178
infix operator <! {
179-
precedence 150
180179
associativity left
180+
precedence 150
181181
}
182182

183183
/// MARK: Data.Set

0 commit comments

Comments
 (0)