ruricolist / cloture

Clojure in Common Lisp
376 stars 7 forks source link

Series? #4

Open ruricolist opened 4 years ago

ruricolist commented 4 years ago

Investigate using Series to implement lazy sequences.

If there's any language that could benefit from loop fusion, it's Clojure.

mdbergmann commented 4 years ago

Series seems like a good fit.

ruricolist commented 4 years ago

It does seem that way, but it may be necessary to make an internal fork to extend it to cooperate with Clojure's sequence protocols.

mdbergmann commented 3 years ago

On the other hand. Lazy sequences are actually not that hard to implement. It's pretty much what is written in SICP chapter 3.5 (https://sarabander.github.io/sicp/html/3_002e5.xhtml). The question is what is the effort for that compared to making Series work.

ruricolist commented 3 years ago

Lazy sequences are already implemented in a basic way, but Clojure is a language that would greatly benefit from Series-style loop fusion.