Last active
August 29, 2015 14:16
-
-
Save sjolsen/cfca701b338592d73bd3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun english-list (list) | |
(format nil "~{~#[the empty list~:;~ | |
the list containing ~#[~;~ | |
~A~;~ | |
~A and ~A~:;~ | |
~@{~#[~;and ~]~A~^, ~}~]~]~:}" | |
list)) | |
(loop | |
for i from 0 to 5 | |
for l = (loop | |
for j from 0 below i | |
collecting (format nil "~R" j)) | |
do (format t "~@(~A~).~%" (english-list l))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment