Skip to content

Commit 87be7d0

Browse files
authored
Merge branch 'main' into update/scala-library-2.13.8
2 parents 3cc9d79 + 1b1a2ed commit 87be7d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/scala/scalatutorial/sections/ObjectOrientedProgramming.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,6 @@ object ObjectOrientedProgramming extends ScalaTutorialSection {
457457
* Here are their implementations:
458458
*
459459
* {{{
460-
* class Empty extends IntSet {
461-
* def contains(x: Int): Boolean = false
462-
* def incl(x: Int): IntSet = new NonEmpty(x, new Empty, new Empty)
463-
* }
464-
*
465460
* class NonEmpty(elem: Int, left: IntSet, right: IntSet) extends IntSet {
466461
*
467462
* def contains(x: Int): Boolean =
@@ -474,6 +469,11 @@ object ObjectOrientedProgramming extends ScalaTutorialSection {
474469
* else if (x > elem) new NonEmpty(elem, left, right incl x)
475470
* else this
476471
* }
472+
*
473+
* class Empty extends IntSet {
474+
* def contains(x: Int): Boolean = false
475+
* def incl(x: Int): IntSet = new NonEmpty(x, new Empty, new Empty)
476+
* }
477477
* }}}
478478
*
479479
* `Empty` and `NonEmpty` both ''extend'' the class `IntSet`.

0 commit comments

Comments
 (0)