File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/scala/scalatutorial/sections Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -457,11 +457,6 @@ object ObjectOrientedProgramming extends ScalaTutorialSection {
457
457
* Here are their implementations:
458
458
*
459
459
* {{{
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
- *
465
460
* class NonEmpty(elem: Int, left: IntSet, right: IntSet) extends IntSet {
466
461
*
467
462
* def contains(x: Int): Boolean =
@@ -474,6 +469,11 @@ object ObjectOrientedProgramming extends ScalaTutorialSection {
474
469
* else if (x > elem) new NonEmpty(elem, left, right incl x)
475
470
* else this
476
471
* }
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
+ * }
477
477
* }}}
478
478
*
479
479
* `Empty` and `NonEmpty` both ''extend'' the class `IntSet`.
You can’t perform that action at this time.
0 commit comments