Skip to content

Commit dd1db7a

Browse files
committed
Revert: Switch to prefix type arguments
(reverted from commit d6ba157)
1 parent 12cb7a1 commit dd1db7a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/docs/reference/extension-methods.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ def circumference(c: Circle): Double = c.radius * math.Pi * 2
3232
assert(circle.circumference == CircleOps.circumference(circle))
3333
```
3434

35-
36-
3735
### Translation of Calls to Extension Methods
3836

3937
When is an extension method considered? There are two possibilities. The first (and recommended one) is by defining the extension method as a member of an implicit value. The method can then be used as an extension method wherever the implicit value is applicable. The second possibility is by making the extension method itself visible under a simple name, typically by importing it. As an example, consider an extension method `longestStrings` on `String`. We can either define it like this:
@@ -175,7 +173,7 @@ that problem, it is recommended that the name of an extension method is
175173
preceded by a space and is also followed by a space if there are more parameters
176174
to come.
177175

178-
`### Extension Methods and TypeClasses
176+
### Extension Methods and TypeClasses
179177

180178
The rules for expanding extension methods make sure that they work seamlessly with typeclasses. For instance, consider `SemiGroup` and `Monoid`.
181179
```scala

0 commit comments

Comments
 (0)