From ae73b539756b429406f9dec48c793119b8075249 Mon Sep 17 00:00:00 2001 From: ssisksl77 Date: Sun, 15 May 2016 01:06:46 +0900 Subject: [PATCH] Update exploring.clj line56 (defn index-filter [pred coll] (when pred (for [[idx elt] (indexed coll) :when (pred elt)] idx))) I think that 'when' is not necessary. and I've changed like this. (defn index-filter [pred coll] (for [[idx elt] (indexed coll) :when (pred elt)] idx)) please check this out. If I am wrong. I'd be grateful that If you send me an email. ssisksl77@gmail.com --- src/examples/exploring.clj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/examples/exploring.clj b/src/examples/exploring.clj index 892404c..90d66f0 100644 --- a/src/examples/exploring.clj +++ b/src/examples/exploring.clj @@ -54,8 +54,7 @@ ; START: index-filter (defn index-filter [pred coll] - (when pred - (for [[idx elt] (indexed coll) :when (pred elt)] idx))) + (for [[idx elt] (indexed coll) :when (pred elt)] idx)) ; END: index-filter ; START:index-of-any (defn index-of-any [pred coll]