File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
docs/docs/reference/contextual Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,10 @@ circle.circumference
20
20
21
21
### Translation of Extension Methods
22
22
23
- Extension methods are methods that have a parameter clause in front of the defined
24
- identifier. They translate to functions where the leading parameter list is
25
- either turned into the first argument list of the function or
26
- into the last argument list in case of a right-associative identifier.
27
- So, the definition of ` circumference ` above translates
28
- to the following function, and can also be invoked as such:
23
+ Extension methods are methods that have a parameter clause in front of the defined identifier.
24
+ They translate to functions where the leading parameter section is turned into the first argument list of the function.
25
+ So, the definition of ` circumference ` above translates to the following function, and can also be invoked as such:
26
+
29
27
``` scala
30
28
def circumference (c : Circle ): Double = c.radius * math.Pi * 2
31
29
@@ -284,4 +282,4 @@ extension on ...
284
282
extension <ident > on ...
285
283
extension { ...
286
284
extension <ident > { ...
287
- ```
285
+ ```
You can’t perform that action at this time.
0 commit comments