You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_spec/03-types.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -219,9 +219,9 @@ SimpleType ::= ‘(’ Types ‘)’
219
219
220
220
A _tuple type_ ´(T_1, ..., T_n)´ where ´n \geq 2´ is an alias for the type `´T_1´ *: ... *: ´T_n´ *: scala.EmptyTuple`.
221
221
222
-
Note:
223
-
`(´T´)` is just the type ´T´, and not `´T´ *: scala.EmptyTuple`.
224
-
`()` is not a valid type, and not `scala.EmptyTuple`.
222
+
Notes:
223
+
-`(´T´)` is just the type ´T´, and not `´T´ *: scala.EmptyTuple`.
224
+
-`()` is not a valid type, and not `scala.EmptyTuple`.
225
225
226
226
If ´n \leq 22´, the type `´T_1´ *: ... *: ´T_n´ *: scala.EmptyTuple` is both a subtype and a supertype of tuple class `scala.Tuple´_n´[´T_1´, ..., ´T_n´]`.
Copy file name to clipboardExpand all lines: docs/_spec/06-expressions.md
+7-9Lines changed: 7 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -217,9 +217,9 @@ Once the types ´S_i´ have been determined, the method ´f´ of the above metho
217
217
If ´f´ is instead of some value type, the application is taken to be equivalent to `´f´.apply(´e_1, ..., e_m´)`, i.e. the application of an `apply` method defined by ´f´.
218
218
Value `´f´` is applicable to the given arguments if `´f´.apply` is applicable.
219
219
220
-
Note:
221
-
In the case where ´f´ or `´f´.apply` is a polymorphic method, this is taken as an [ommitted type application](#type-applications).
222
-
`´f´` is applicable to the given arguments if the result of this type application is applicable.
220
+
Notes:
221
+
-In the case where ´f´ or `´f´.apply` is a polymorphic method, this is taken as an [ommitted type application](#type-applications).
222
+
-`´f´` is applicable to the given arguments if the result of this type application is applicable.
223
223
224
224
The application `´f´(´e_1, ..., e_n´)` evaluates ´f´ and then each argument ´e_1, ..., e_n´ from left to right, except for arguments that correspond to a by-name parameter (see below).
225
225
Each argument expression is converted to the type of its corresponding formal parameter.
A _tuple expression_`(´e_1´, ..., ´e_n´)` where ´n \geq 2´ is equivalent to the expression `´e_1´ *: ... *: ´e_n´ *: scala.EmptyTuple`.
385
385
386
-
Note:
387
-
As calls to `*:` are slow, a more efficient translation is free to be implemented.
388
-
For example, `(´e_1´, ´e_2´)` could be translated to `scala.Tuple2(´e_1´, ´e_2´)`, which is indeed equivalent to `´e_1´ *: ´e_2´ *: scala.EmptyTuple`.
386
+
Note: as calls to `*:` are slow, a more efficient translation is free to be implemented. For example, `(´e_1´, ´e_2´)` could be translated to `scala.Tuple2(´e_1´, ´e_2´)`, which is indeed equivalent to `´e_1´ *: ´e_2´ *: scala.EmptyTuple`.
389
387
390
-
Note:
391
-
The expression `(´e_1´)` is not equivalent to `´e_1´ *: scala.EmptyTuple`, but instead a regular parenthesized expression.
392
-
The expression `()` is not an alias for `scala.EmptyTuple`, but instead the unique value of type `scala.Unit`.
388
+
Notes:
389
+
-The expression `(´e_1´)` is not equivalent to `´e_1´ *: scala.EmptyTuple`, but instead a regular parenthesized expression.
390
+
-The expression `()` is not an alias for `scala.EmptyTuple`, but instead the unique value of type `scala.Unit`.
Copy file name to clipboardExpand all lines: docs/_spec/08-pattern-matching.md
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -187,13 +187,10 @@ This is further discussed [here](#pattern-sequences).
187
187
188
188
A _tuple pattern_`(´p_1´, ..., ´p_n´)` where ´n \geq 2´ is equivalent to `´p_1´ *: ... *: ´p_n´ *: scala.EmptyTuple`.
189
189
190
-
Note:
191
-
`()` is equivalent to `_: scala.Unit`, and not `scala.EmptyTuple`.
192
-
`(´pat´)` is a pattern matching ´pat´, and not `´pat´ *: scala.EmptyTuple`.
193
-
194
-
Note:
195
-
As such patterns with `*:` are slow, a more efficient translation is free to be implemented.
196
-
For example, `(´p_1´, ´p_2´)` could be translated to `scala.Tuple2(´p_1´, ´p_2´)`, which is indeed equivalent to `´p_1´ *: ´p_2´ *: scala.EmptyTuple`.
190
+
Notes:
191
+
-`()` is equivalent to `_: scala.Unit`, and not `scala.EmptyTuple`.
192
+
-`(´pat´)` is a pattern matching ´pat´, and not `´pat´ *: scala.EmptyTuple`.
193
+
- As such patterns with `*:` are slow, a more efficient translation is free to be implemented. For example, `(´p_1´, ´p_2´)` could be translated to `scala.Tuple2(´p_1´, ´p_2´)`, which is indeed equivalent to `´p_1´ *: ´p_2´ *: scala.EmptyTuple`.
0 commit comments