mirror of
https://github.com/fiddlerwoaroof/data-lens.git
synced 2025-11-08 10:16:32 +00:00
feat(transducers): add lazy-sequence constructor
This commit is contained in:
@ -101,6 +101,8 @@
|
||||
|
||||
(defclass lazy-sequence ()
|
||||
((%next :initarg :next :reader next)))
|
||||
(defun lazy-sequence (next)
|
||||
(make-instance 'lazy-sequence :next next))
|
||||
(defmethod reduce-generic ((seq lazy-sequence) (func function) init)
|
||||
(let ((next (next seq)))
|
||||
(loop for next-val = (funcall next)
|
||||
|
||||
Reference in New Issue
Block a user