We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cec414c commit 5d16a62Copy full SHA for 5d16a62
_th/tour/traits.md
@@ -44,7 +44,7 @@ trait Iterator[A] {
44
45
{% tab 'Scala 3' for=trait-iterator-definition %}
46
47
-```scala
+```scala 3
48
trait Iterator[A]:
49
def hasNext: Boolean
50
def next(): A
@@ -92,7 +92,7 @@ iterator.next() // returns 1
92
93
{% tab 'Scala 3' for=trait-intiterator-definition %}
94
95
96
97
98
@@ -179,7 +179,7 @@ animals.foreach(pet => println(pet.name)) // แสดงค่า Harry Sally
179
180
{% tab 'Scala 3' for=trait-pet-example %}
181
182
183
import scala.collection.mutable.ArrayBuffer
184
185
trait Pet:
0 commit comments