lisp-koans 0,1,1,0,0,1,1,0

Common Lisp Koans is a language learning exercise in the same vein as the ruby koans, python koans and others. It is a port of the prior koans with some modifications to highlight lisp-specific features. Structured as ordered groups of broken unit test

2 years after Apache-2.0

Getting Started

From a terminal, execute your lisp interpreter on the file 'contemplate.lsp' e.g.

abcl --noinform --noinit --load contemplate.lsp --eval '(quit)'
ccl -n -l contemplate.lsp -e '(quit)'
clisp -q -norc -ansi contemplate.lsp
ecl -norc -load contemplate.lsp -eval '(quit)'
sbcl --script contemplate.lsp

Running on a fresh version should output the following:

Thinking about ASSERTS
    ASSERT-TRUE requires more meditation.

You have not yet reached enlightenment ...
  A koan is incomplete.

Please meditate on the following code:
   File "koans/asserts.lsp"
   Current koan assert status is "(INCOMPLETE)"

You are now 0/169 koans and 0/25 lessons closer to reaching enlightenment

This indicates that the script has completed, and that the learner should look to asserts.lsp to locate and fix the problem. The problem will be within a define-test expression such as

(define-test assert-true
    "t is true.  Replace the blank with a t"
    (assert-true ___))

In this case, the test is incomplete, and the student should fill in the blank (____) with appropriate lisp code to make the assert pass.

In order to test code, or evaluate tests interactively, students may copy and paste code into the lisp command line REPL.

Quoting the Ruby Koans instructions::

"In test-driven development the mantra has always been, red, green, refactor. Write a failing test and run it (red), make the test pass (green), then refactor it (that is look at the code and see if you can make it any better). In this case you will need to run the koan and see it fail (red), make the test pass (green), then take a moment and reflect upon the test to see what it is teaching you and improve the code to better communicate its intent (refactor)."


The Common Lisp koans are based on the python koans and ruby koans projects. Additionally, many of the tests are based on new material that is special to Common Lisp.

Note that the unit on threads uses an SBCL specific threading API. A reader macro will remove this unit on Lisp implementations other than SBCL.

Related Repositories



:blue_book: A curated list of awesome open source or open source licensed docume ...



A curated list of awesome Common Lisp frameworks, libraries and other shiny stuf ...



A curated list of program language koans. ...



A curated list of awesome Erlang frameworks, libraries and software. ...



Uma lista revisada de recursos práticos e acadêmicos para estudantes de Ciência ...

Top Contributors

bileschi flpa astronaut-wannabe JuanitoFatas lateau christianromney rjsamson Tanner filipk csimons ideal-knee dwchandler DavidSouther wcn3 Gibheer Hettomei Jamil thejnich jondeandres matthewschallenkamp wlbr itugs chuchana duedl0r kjgorman rodnaph v-a-1