Could you re-write this w/ comp, and repost? On Dec 15, 2:00 pm, samppi <rbysam...@gmail.com> wrote: > I'm trying to rewrite a loop to use higher-level functions instead. > For pure functions f1, f2, f3, f4, f5, f6?, and f7, and a Clojure > object a0, how can one rewrite the following loop to use map, reduce, > etc.? > > (loop [a a0] > (let [b (f1 a) > c (f2 b) > d (f3 c) > e (f4 d) > g (f5 c) > h (-> e f2 f5)] > (if (or (f6? b) (<= g h)) > e > (recur (f7 d b)))))
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en