(1) Is there any way I can extract from a Clojure lazy sequence at some
given point in its use those of its members that have so far been
realized? For example, can I extract the cache of realized members, turn
it into a vector, and then process that vector independently of further
use of the lazy sequence?
(2) If I can't extract the cache, is there some way that I can at least
discover how many realized sequence members have so far been put into
the cache?
It is obvious that, if all I want is an initial segment of a lazy
sequence, I can force the initial segment's realization and get hold of
it for further processing (independent of its source) with the take
function -- but I want to know how many and what members of the lazy
sequence have so far been realized independently of my forcing their
realization -- for example, in order to evaluate and compare success so
far of alternative solution paths being simultaneously pursued by an AI
algorithm.
Thanks in advance for any relevant advice.
--Larry
--
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