Is there a function that applies a transformation to a sequence and returns only the non-nil values?
Right now I am using the following (as an example):
(seq-filter #'identity (mapcar (lambda (x)
(when (< x 3) (+ x 5)))
'(1 2 3 4 5 6)))
Or through dolist
(defun mapcar-true (func list)
(let (value)
(dolist (elt list value)
(when-let ((trans (funcall func elt)))
(setq value (append value (list trans)))))))
But I feel there must be a more straightforward way.