From c6defc1a0fdd8356aad4eeaf41c8d3ba445d8a46 Mon Sep 17 00:00:00 2001 From: Akash Date: Fri, 26 Mar 2021 09:47:02 +0530 Subject: [PATCH 1/2] ch01.md Flock example Change requested as per: > they increase by the number of seagulls with whom they're breeding Thanks! --- ch01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch01.md b/ch01.md index fc57e37c..40c308d1 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; } } From cbfe71614e8fc6d3f9b06cf2d6d54f91c123049e Mon Sep 17 00:00:00 2001 From: Akash Date: Fri, 26 Mar 2021 09:51:07 +0530 Subject: [PATCH 2/2] Update ch01.md --- ch01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch01.md b/ch01.md index 40c308d1..32d68180 100644 --- a/ch01.md +++ b/ch01.md @@ -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!