This was an example, I thought it was simple for you to interpret this one and modify it accordingly.
Without knowing your lisps, then maybe like this?
(defun c:FOO ( / )
(if (not (c:xx)) (load "xx.lsp"))
(if (not (c:yy)) (load "yy.lsp"))
(mapcar
'(lambda (x)
(cond
((and (not (zerop (atoi x))) (eq (atof x) (atoi x)))
(if (zerop (rem (atoi x) 2))
(c:xx)
(c:yy)
)
)
(T (princ (strcat "\nThe layout \"" x "\" have not name with interger or is null")))
)
)
(layoutlist)
)
(textscr)
(prin1)
)