feat: allow transducer parts to be past as a list

This commit is contained in:
Edward
2021-01-04 00:50:38 -08:00
parent 705dc56244
commit 1a07eb7339

View File

@ -131,7 +131,10 @@
((it) (funcall rf it)))))) ((it) (funcall rf it))))))
(defun transduce (xf build seq) (defun transduce (xf build seq)
(let ((transducer (funcall xf (stepper build)))) (let* ((xf (etypecase xf
(list (apply 'alexandria:compose xf))
((or function symbol) xf)))
(transducer (funcall xf (stepper build))))
(unwrap build (unwrap build
(funcall transducer (funcall transducer
(catch 'done (catch 'done