I thought that since into uses reduce, it would be lazy, but I was wrong.
reduce just plows through everything with a non-lazy recursion.

Why is reduce not lazy?

--Robert McIntyre

On Mon, Sep 6, 2010 at 12:37 PM, Michał Marczyk
<michal.marc...@gmail.com> wrote:
> On 6 September 2010 18:29, Robert McIntyre <r...@mit.edu> wrote:
>> walk is good but it's not lazy. If you want to preserve laziness you can do:
>
> This won't be lazy, because (into {} ...) is a strict operation.
>
> I'd suggest something like
>
> (defn mmap [f m]
>  (zipmap (keys m) (map f (vals m))))
>
> f is expected to care about the value only.
>
> Sincerely,
> Michał
>
> --
> 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

-- 
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

Reply via email to