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 {
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`.
You can’t perform that action at this time.
0 commit comments