Kevin Downey <redc...@gmail.com> writes:

Hi Kevin,

>> This is the new version using reducers (:as r).  The problem here is
>> that to stop the iteration, one has to reduce the intermediate result
>> in every step and check if new reachable vertices (n) could be found.
>> If so, we need to do another iteration.
>
> this is almost certainly the problem, if you are using reducers you
> should not make intermediate results concrete.  given the structure of
> your computation it may not be a good fit for reducers.

I guessed that, but wanted to be extra-sure.

> you might be able to restructure in such a way as return something
> with a custom impl of CollReduce that performs this computation when
> reduced, which would get you out of returning concrete results.

Hm, yes, sounds good.  I think, I need to have another look at the
reducers implementation...

Thanks for the hint,
Tassilo

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