daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest May 24th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top