The function got formatted. Here it is again:
(defun resolve-generic-type (generic-type-definition) (if (consp generic-type-definition) (let* ((type-args (rest generic-type-definition)) (args (length type-args)) (resolved-type-args (mapcar #'resolve-generic-type type-args)) (main-type-name (format nil "~a`~d" (first generic-type-definition) args)) (main-type-resolved (resolve-type-name main-type-name)) ;; The comma separates the full ;; type name of the main type from the assembly-name, ;; we need to add the parameter-type in the middle ;; in square parenthesis before the assembly.. (comma (position #, main-type-resolved)) (pre-type-result (when comma (subseq main-type-resolved 0 comma))) (post-type-result (when comma (subseq main-type-resolved comma (length main-type-resolved))))) (if comma (format nil "~a[~{[~a]~^,~}]~a" pre-type-result resolved-type-args post-type-result) (format nil "~a[~{[~a]~^,~}]" main-type-resolved resolved-type-args))) (resolve-type-name generic-type-definition)))