feat: add of-type to generate semipredicates

This commit is contained in:
Edward Langley
2023-07-15 10:11:11 -07:00
parent 98492358e3
commit ea7e56385c

View File

@ -193,6 +193,11 @@
(alexandria:ends-with-subseq suffix (alexandria:ends-with-subseq suffix
it)))) it))))
(defun of-type (type)
(lambda (it)
(when (typep it type)
it)))
(defun transform-head (fun) (defun transform-head (fun)
(lambda (it) (lambda (it)
(typecase it (typecase it