From b9ac0878d3e67de9d5c60ead8ec8ad3d62f09664 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Mon, 13 Oct 2014 21:16:43 +0200 Subject: [PATCH] Missing parens in code example --- .../mainmatter/1.objects/4.composition-and-extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md b/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md index d88c88c..a994b7c 100644 --- a/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md +++ b/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md @@ -86,7 +86,7 @@ Consider a [queue]: pullHead: function () { var value; - if tail >= head { + if (tail >= head) { value = array[head]; array[head] = void 0; head += 1; @@ -171,4 +171,4 @@ Now we can extend a queue into a deque: Presto, we have reuse through extension, at the cost of encapsulation. -T> Encapsulation and Extension exist in a natural state of tension. A program with elaborate encapsulation resists breakage but can also be difficult to refactor in other ways. Be mindful of when it's best to Compose and when it's best to Extend. \ No newline at end of file +T> Encapsulation and Extension exist in a natural state of tension. A program with elaborate encapsulation resists breakage but can also be difficult to refactor in other ways. Be mindful of when it's best to Compose and when it's best to Extend.