Skip to content

Commit 5cd3a3a

Browse files
prolativodersky
authored andcommitted
Fix right associative extension method docs
1 parent b93b40b commit 5cd3a3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/contextual/right-associative-extension-methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ it has a name ending in `:` and is immediately followed by a
2323
single parameter. In the example above, that parameter is `(y: Y)`.
2424

2525
The Scala compiler pre-processes a right-associative infix operation such as `x +: xs`
26-
to `xs.+:(x)` if `x` and `xs` are pure expressions or `x` is a call-by-name parameter and to `val y = x; xs.+:(y)` otherwise. This is necessary since a regular right-associative infix method
26+
to `xs.+:(x)` if `x` is a pure expression or a call-by-name parameter and to `val y = x; xs.+:(y)` otherwise. This is necessary since a regular right-associative infix method
2727
is defined in the class of its right operand. To make up for this swap,
2828
the expansion of right-associative extension methods performs an analogous parameter swap. More precisely, if `otherParams` consists of a single parameter
2929
`rightParam` followed by `remaining`, the total parameter sequence

0 commit comments

Comments
 (0)