In article <··············@ponder>, Jesse writes:
|> Hi,
|> Sometimes it is useful to be able to analyse an atom as a list of its
|> characters. But how to do this? I know there is a function 'explode' that
|> can transfer an atom to a list. But some lisp intepreter doesn't support
|> this function. Is there any way to enforce 'explode' in gclisp?
If you want to do this for arbitrary atoms, you can define 'explode' as:
(defun explode (x)
(coerce (princ-to-string x) 'list))
Of course, this actually works for anything that you can princ.
If you just wanted this for symbols, you could substitute 'symbol-name' for
'princ-to-string'.
Dan