From cefd4fbab3491a91e1136d6ad5671b5927e0834c Mon Sep 17 00:00:00 2001 From: fiddlerwoaroof Date: Fri, 18 Dec 2020 22:32:19 -0800 Subject: [PATCH] feat(transducers): add lazy-sequence constructor --- transducers.lisp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transducers.lisp b/transducers.lisp index ed6b6ef..7a874e1 100644 --- a/transducers.lisp +++ b/transducers.lisp @@ -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)