vendor/quickutils.lisp @ 555f4470bf64
Add test harness
author |
Steve Losh <steve@stevelosh.com> |
date |
Mon, 20 Mar 2017 15:24:02 +0000 |
parents |
c6a3ab353556 |
children |
d997d6e268a3 |
;;;; This file was automatically generated by Quickutil.
;;;; See http://quickutil.org for details.
;;;; To regenerate:
;;;; (qtlc:save-utils-as "quickutils.lisp" :utilities '(:SYMB) :ensure-package T :package "PCG.QUICKUTILS")
(eval-when (:compile-toplevel :load-toplevel :execute)
(unless (find-package "PCG.QUICKUTILS")
(defpackage "PCG.QUICKUTILS"
(:documentation "Package that contains Quickutil utility functions.")
(:use #:cl))))
(in-package "PCG.QUICKUTILS")
(when (boundp '*utilities*)
(setf *utilities* (union *utilities* '(:MKSTR :SYMB))))
(defun mkstr (&rest args)
"Receives any number of objects (string, symbol, keyword, char, number), extracts all printed representations, and concatenates them all into one string.
Extracted from _On Lisp_, chapter 4."
(with-output-to-string (s)
(dolist (a args) (princ a s))))
(defun symb (&rest args)
"Receives any number of objects, concatenates all into one string with `#'mkstr` and converts them to symbol.
Extracted from _On Lisp_, chapter 4.
See also: `symbolicate`"
(values (intern (apply #'mkstr args))))
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(symb)))
;;;; END OF quickutils.lisp ;;;;