On Jun 29, 12:55 am, Ken Wesson <[email protected]> wrote:
> On Wed, Jun 29, 2011 at 3:53 AM, Alan Malloy <[email protected]> wrote:
> > This layout makes it fairly clear that the first element of total-
> > values is never being used, but it would be nice if we could say so
> > explicitly. So finally, we can wrap the whole thing in a let:
>
> > (defn calc [total-values daily-values]
> >  (let [interesting-values (next total-values)]
> >    (map-indexed
> >     (fn [i daily]
> >       (->> total-values
> >            (drop i)
> >            (map #(inc (/ % 100.0)))
> >            (reduce * daily)))
> >     daily-values)))
>
> Oops.

Not sure if this is what you're pointing out (a single word is tricky
to decipher), but I did forget to *use* interesting-values after
defining it: it should be the first form in the ->> list.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to