3 ms·
how does it implement clojure's lazy sequences? does it manage to map them to generators?
by andrewcooke 15y ago
how does it implement clojure's lazy sequences? does it manage to map them to generators?
- irahul 15y agoFrom a cursory glance at https://github.com/eigenhombre/PyClojure/blob/master/core.py https://github.com/eigenhombre/PyClojure/blob/master/core.py it doesn't do anything with the lists yet, other than having a list class which stores the values. As far as lazy goes, how does clojure does it? Thunks? The implementer can opt for thunks or generators(doesn't generator serve as an higher level abstraction to manually "thunk and force") as far as Python implementation goes.
- andrewcooke 15y agoi have no idea how clojure is implemented, but i guess i always assumed that they were implemented as iterators.