@@ -152,27 +152,11 @@ function.
152
152
153
153
#### Examples
154
154
155
- | Expression
156
-
157
- | Result
158
-
159
- |
160
- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | | | | |
161
- | ` sort_by(people, &age)[].age `
162
-
163
- | [ 10, 20, 30, 40, 50]
164
-
165
- |
166
- | ` sort_by(people, &age)[0] `
167
-
168
- | {“age”: 10, “age_str”: “10”, “bool”: true, “name”: 3}
169
-
170
- |
171
- | ` sort_by(people, &to_number(age_str))[0] `
172
-
173
- | {“age”: 10, “age_str”: “10”, “bool”: true, “name”: 3}
174
-
175
- |
155
+ | Expression | Result
156
+ | ---| ---|
157
+ | ` sort_by(people, &age)[].age ` | [ 10, 20, 30, 40, 50]
158
+ | ` sort_by(people, &age)[0] ` | {"age": 10, "age_str": "10", "bool": true, "name": 3}
159
+ | ` sort_by(people, &to_number(age_str))[0] ` | {"age": 10, "age_str": "10", "bool": true, "name": 3}
176
160
#### max_by
177
161
178
162
```
@@ -186,37 +170,13 @@ given input.
186
170
187
171
#### Examples
188
172
189
- | Expression
190
-
191
- | Result
192
-
193
- |
194
- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
195
- | ` max_by(people, &age) `
196
-
197
- | {“age”: 50, “age_str”: “50”, “bool”: false, “name”: “d”},
198
-
199
- |
200
- | ` max_by(people, &age).age `
201
-
202
- | 50
203
-
204
- |
205
- | ` max_by(people, &to_number(age_str)) `
206
-
207
- | {“age”: 50, “age_str”: “50”, “bool”: false, “name”: “d”},
208
-
209
- |
210
- | ` max_by(people, &age_str) `
211
-
212
- | <error: invalid-type>
213
-
214
- |
215
- | ` max_by(people, age) `
216
-
217
- | <error: invalid-type>
218
-
219
- |
173
+ | Expression | Result
174
+ | ---| ---|
175
+ | ` max_by(people, &age) ` | {"age": 50, "age_str": "50", "bool": false, "name": "d"}
176
+ | ` max_by(people, &age).age ` | 50
177
+ | ` max_by(people, &to_number(age_str)) ` | {"age": 50, "age_str": "50", "bool": false, "name": "d"},
178
+ | ` max_by(people, &age_str) ` | <error: invalid-type>
179
+ | ` max_by(people, age) ` | <error: invalid-type>
220
180
#### min_by
221
181
222
182
```
@@ -230,41 +190,17 @@ given input.
230
190
231
191
#### Examples
232
192
233
- | Expression
234
-
235
- | Result
236
-
237
- |
238
- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
239
- | ` min_by(people, &age) `
240
-
241
- | {“age”: 10, “age_str”: “10”, “bool”: true, “name”: 3}
242
-
243
- |
244
- | ` min_by(people, &age).age `
245
-
246
- | 10
247
-
248
- |
249
- | ` min_by(people, &to_number(age_str)) `
250
-
251
- | {“age”: 10, “age_str”: “10”, “bool”: true, “name”: 3}
252
-
253
- |
254
- | ` min_by(people, &age_str) `
255
-
256
- | <error: invalid-type>
257
-
258
- |
259
- | ` min_by(people, age) `
260
-
261
- | <error: invalid-type>
193
+ | Expression | Result |
194
+ |---|---
195
+ | ` min_by(people, &age) ` | {"age": 10, "age_str": "10", "bool": true, "name": 3}
196
+ | ` min_by(people, &age).age ` | 10
197
+ | ` min_by(people, &to_number(age_str)) ` | {"age": 10, "age_str": "10", "bool": true, "name": 3}
198
+ | ` min_by(people, &age_str) ` | <error: invalid-type>
199
+ | ` min_by(people, age) ` | <error: invalid-type>
262
200
263
- |
264
201
### Alternatives
265
202
266
- There were a number of alternative proposals considered. Below outlines
267
- several of these alternatives.
203
+ There were a number of alternative proposals considered. Below outlines several of these alternatives.
268
204
269
205
#### Logic in Argument Resolver
270
206
0 commit comments