You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This turned out to be harder than expected. The problem wasn't that the bodies of the lazy-seqs in, say, filter and map, are not suspendable. Actually, resuming them would have been fine. The only functions that really required instrumentation are those that recur like doall.
The problem was much more incidental. First, the lazy-seq macro tags the function with :once which causes refs to closure to nullify during first call. This means that upon resumption (or re-run) the function wouldn't run properly. However, a message on the clojure mailing lists says that the :once tag on lazy-seq is unnecessary. So that's just unfortunate. This resulted in the need to redefine lazy-seq as well as the functions using it.
The second problem was in the LazySeq class itself. The function seq nullifies svbefore looping on ls. If it had only nullified it later, it would have been fine (because suspension happens in sval()). This resulted in the need to define a new LazySeq class.
Also, see #2 .
The text was updated successfully, but these errors were encountered: