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
2020
2121### Translation of Extension Methods
2222
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+
2927``` scala
3028def circumference (c : Circle ): Double = c.radius * math.Pi * 2
3129
@@ -284,4 +282,4 @@ extension on ...
284282extension <ident > on ...
285283extension { ...
286284extension <ident > { ...
287- ```
285+ ```
You can’t perform that action at this time.
0 commit comments