Skip to content

Instantly share code, notes, and snippets.

@fukamachi
Last active December 22, 2015 08:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fukamachi/6446193 to your computer and use it in GitHub Desktop.
Save fukamachi/6446193 to your computer and use it in GitHub Desktop.
Print "Hello World" to the *standard-output* without using integer, string and character literals in Common Lisp.
;; This is a answer for a question of CodeIQ.
;; https://codeiq.jp/ace/cielavenir/q431
(in-package :cl-user)
(defmacro print-capitalized (symbol &rest symbols)
`(progn
(princ ,(string-capitalize symbol))
,@(loop for s in symbols
collect `(princ ,(name-char 'space))
collect `(princ ,(string-capitalize s)))))
(print-capitalized hello world)
;-> Hello World
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment