Skip to content

Commit 1bd517e

Browse files
author
Arnaud ESTEVE
committed
Wrap the last sentence in a whole "summary" section to avoid stray text
1 parent a5c8aef commit 1bd517e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/docs/reference/contextual/typeclasses-new.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,10 @@ given readerMonad[Ctx] as Monad[[X] =>> Ctx => X] {
106106
}
107107
```
108108

109+
### Summary
109110

110-
The conjunction of given instances, extension methods and context bounds allow a concise and natural expression of _typeclasses_
111+
The definition of a _typeclass_ is expressed in Scala 3 via a `trait`.
112+
The main difference with other traits resides in how these traits are implemented.
113+
In the case of a _typeclass_ the trait's implementations are expressed through `given ... as` type definitions, and not through classes that `extends` the trait linearly.
114+
115+
In addition to these given instances, extension methods and context bounds allow a concise and natural expression of _typeclasses_.

0 commit comments

Comments
 (0)