Giter Site home page Giter Site logo

lisp-koans-answers's Introduction

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"
   Koan "ASSERT-TRUE"
   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)."

Content

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.

lisp-koans-answers's People

Contributors

astronaut-wannabe avatar bileschi avatar csimons avatar davidsouther avatar duedl0r avatar dwchandler avatar filipk avatar gibheer avatar ideal-knee avatar informatimago avatar jamil avatar jondeandres avatar juanitofatas avatar kjgorman avatar matthewschallenkamp avatar rjsamson avatar rodnaph avatar ryukinix avatar tanner avatar thejnich avatar v-a-1 avatar wcn3 avatar wlbr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.