3 ms·
Shameless plug: I had created a similar library[0] for common lisp, though it didn't use conditions and restarts, also lacked a definitive yield construct. It s
by ykm 10y ago
Shameless plug: I had created a similar library[0] for common lisp, though it didn't use conditions and restarts, also lacked a definitive yield construct. It still is profound how a major feature for other programming language is trivial to add to common lisp.
[0]: https://github.com/ykm/cl-iterators https://github.com/ykm/cl-iterators
- codr4life 10y agoBut you still require extensions to cut up the algorithm in discrete blocks, right? Much thanks to macros, as usual; without that support, the approach wouldn't really be feasible for general purpose use.
- ykm 10y agoHmmm, frankly its just a CLOS object, with the defmethods controlling the iteration. I tried to model the object like Python iterators, however the API ended up a bit more like Haskell.
- codr4life 10y agoAight, just to clarify; the step wise, stuttering experience that normally comes with extending iterators is what I'm trying to get away from here :)