a guest May 24th, 2018 63 Never
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)))))
RAW Paste Data