(defun range (start end) "Create a list with values between `start' and `end'" (if (equal start end) nil (cons start (range (1+ start) end)))) (defun vector-to-lst-dot (vec) "Return a list with sublist. This sublist contains the vector element in string format and a dot in string format." (let ((veclst (concatenate 'list vec))) (if (equal veclst nil) nil (cons (cons (write-to-string (car (mapcar (lambda (x) (elt veclst x)) (range 0 (length veclst))))) (cons "." nil)) (vector-to-lst-dot (cdr veclst)))))) (defun vec-to-dot-string (vec) "Transform a vector in a list. The elements of the vectors in string format and among them, a dot in string format." (let ((flat-lst (alexandria:flatten (vector-to-lst-dot vec)))) (reverse (cdr (reverse flat-lst))))) (defun match? (elem lst) "Return a list with boolean values, verify if `elem' exist in `lst'." (if (equal nil lst) nil (cons (equal elem (car lst)) (match? elem (cdr lst))))) (defun or-match? (elem lst) (car (or (alexandria:flatten (match? elem lst)))))