Skip to content

Commit 5649d13

Browse files
committed
Fixed samples formatting issues in JEP-08.
1 parent c47f60b commit 5649d13

File tree

1 file changed

+20
-84
lines changed

1 file changed

+20
-84
lines changed

proposals/accepted/jep-008-exptype.md

Lines changed: 20 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -152,27 +152,11 @@ function.
152152

153153
#### Examples
154154

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}
176160
#### max_by
177161

178162
```
@@ -186,37 +170,13 @@ given input.
186170

187171
#### Examples
188172

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>
220180
#### min_by
221181

222182
```
@@ -230,41 +190,17 @@ given input.
230190

231191
#### Examples
232192

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>
262200

263-
|
264201
### Alternatives
265202

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.
268204

269205
#### Logic in Argument Resolver
270206

0 commit comments

Comments
 (0)