You cannot "combine characters" in Lisp.
First of all, 5 not a symbol, but a number. If you need a character named "5" , you must enter it as |5| (eg).
If the function accepts the character A and the character |5| and produces an A5 character; it does not combine characters. He created a new character whose name is the name of the names of these input characters.
Properly designed Lisp programs rarely depend on the symbol name. They depend on characters that are unique objects.
If you use symbols to identify things, and both 5 and A identify an entity, the best answer is not necessarily to create a new symbol, which, at least by name, is a mashup of these two symbols. For example, a better design might be to recognize that names are multifaceted or complex in some way. Perhaps the list (A 5) may serve as a name.
Common Lisp functions may have compound names. For example, (setf foo) is the name of the function. Aggregates like lists can be names.
If you just need a machine to create unique characters at runtime, consider using the gensym function. You can pass your own prefix:
(gensym "FOO") ->
Of course, the prefix may be the name of some existing symbol pulled through the symbol-name . Symbol #:FOO0042 not unique because of 0042 , but because it is just the selected object in the address space. #: means it is not interned in any package. Symbol Name FOO0042 .
If you still really want a simple way to take a printed representation of a bunch of input features and turn it into a character:
(defun mashup-symbol (&rest objects) (intern (format nil "~{~a~}" objects)))
Examples:
(mashup-symbol 1 2 3) -> |123| (mashup-symbol '(ab) 'c 3) -> |(AB)C3|