Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun ensure-string (thing)
- "Make THING into a string if at all possible."
- (the (values string &optional)
- (typecase thing
- (string thing)
- (symbol (symbol-name thing))
- (class (class-name thing))
- ;; slow, worst case!
- (t (princ-to-string thing)))))
Add Comment
Please, Sign In to add comment