From 1a7c48731a2cf765daaffd3c55ba6cc724338466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20St=C4=99pie=C5=84?= Date: Fri, 18 Sep 2015 22:22:40 +0200 Subject: [PATCH] Simplify create-previews with map --- src/cryogen_core/compiler.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryogen_core/compiler.clj b/src/cryogen_core/compiler.clj index 70aa9c0..599a43f 100644 --- a/src/cryogen_core/compiler.clj +++ b/src/cryogen_core/compiler.clj @@ -266,7 +266,7 @@ "Returns a sequence of vectors, each containing a set of post previews" [posts-per-page blocks-per-preview posts] (->> posts - (reduce (fn [v post] (conj v (create-preview blocks-per-preview post))) []) + (map #(create-preview blocks-per-preview %)) (partition-all posts-per-page) (map-indexed (fn [i v] {:index (inc i) :posts v}))))