eql5-sfos/lisp/software/alexandria-20210807-git/alexandria-2/sequences.lisp
2021-12-10 22:02:34 +01:00

9 lines
211 B
Common Lisp

(in-package :alexandria-2)
(defun subseq* (sequence start &optional end)
"Like SUBSEQ, but limits END to the length."
(subseq sequence start
(if end
(min end (length sequence)))))