Guest User

Untitled

a guest
May 24th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. (defun ensure-string (thing)
  2. "Make THING into a string if at all possible."
  3. (the (values string &optional)
  4. (typecase thing
  5. (string thing)
  6. (symbol (symbol-name thing))
  7. (class (class-name thing))
  8. ;; slow, worst case!
  9. (t (princ-to-string thing)))))
Add Comment
Please, Sign In to add comment