diff --git a/ch01.md b/ch01.md index fc57e37c..32d68180 100644 --- a/ch01.md +++ b/ch01.md @@ -30,7 +30,7 @@ class Flock { } breed(other) { - this.seagulls = this.seagulls * other.seagulls; + this.seagulls = this.seagulls + other.seagulls + other.seagulls; return this; } } @@ -43,7 +43,7 @@ const result = flockA .breed(flockB) .conjoin(flockA.breed(flockB)) .seagulls; -// 32 +// 24 ``` Who on earth would craft such a ghastly abomination? It is unreasonably difficult to keep track of the mutating internal state. And, good heavens, the answer is even incorrect! It should have been `16`, but `flockA` wound up permanently altered in the process. Poor `flockA`. This is anarchy in the I.T.! This is wild animal arithmetic!