From 7cb67ce28c47b559986f58fcf8448bee5d8e7b43 Mon Sep 17 00:00:00 2001 From: dimovich Date: Fri, 4 Jan 2013 19:15:05 +0200 Subject: [PATCH] Update ch06-datatypes-repl-interactions.clj function literal from cols was missing the anonymous argument and w and h had to be interchanged. --- ch06-datatypes-repl-interactions.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch06-datatypes-repl-interactions.clj b/ch06-datatypes-repl-interactions.clj index 2b55d9a..a8e7b65 100644 --- a/ch06-datatypes-repl-interactions.clj +++ b/ch06-datatypes-repl-interactions.clj @@ -559,8 +559,8 @@ Point {:cols (fn [pt] (let [[h w] (dims pt)] (map - (fn [x] (map #(lookup pt x y) (range 0 w))) - (range 0 h)))) + (fn [x] (map #(lookup pt % x) (range 0 h))) + (range 0 w)))) :rows (fn [pt] (apply map vector (cols pt)))})