Skip to content

Instantly share code, notes, and snippets.

@priyadarshan
Forked from fukamachi/hello-world.lisp
Last active August 29, 2015 14:27
Show Gist options
  • Save priyadarshan/1509fad38d1ad928142d to your computer and use it in GitHub Desktop.
Save priyadarshan/1509fad38d1ad928142d 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