diff options
Diffstat (limited to 'src/util.lisp')
-rw-r--r-- | src/util.lisp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.lisp b/src/util.lisp index 3260de0..9d50a17 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -29,6 +29,12 @@ (defun unlines (lines) (format nil "~{~A~%~}" lines)) +(defun words (text) + (remove "" (split-string text) :test #'string=)) + +(defun unwords (words) + (format nil "~{~A~^ ~}" words)) + (defmacro symbol-named (name symbol) `(and (symbolp ,symbol) (string= (symbol-name ',name) (symbol-name ,symbol)))) |