Code Monkey home page Code Monkey logo

lisp-koans-answer's Introduction

lisp-koans-answer

This is my answers for lisp-koans

Contribute

If you think my answer is not good enough, welcome to contribute your code

lisp-koans-answer's People

Contributors

dongweiming avatar dongwm avatar

Stargazers

 avatar ustcnene avatar Loty Gero avatar Dimitar9 avatar  avatar samu avatar  avatar ET avatar

Watchers

James Cloos avatar  avatar  avatar

lisp-koans-answer's Issues

Wrong answer for `write-your-own-let-statement`

I don't think that is correct, since I presume we are not allowed to change the assert-equal value.
The doc string says "fix the let statement", so a more reasonable answer would be:

(define-test write-your-own-let-statement
      "fix the let statement to get the tests to pass"
    (setf a 100)
    (setf b 23)
    (setf c 456)
    (let ((a 100)
          (b 200)
          (c "Jellyfish"))
      (assert-equal a 100)
      (assert-equal b 200)
      (assert-equal c "Jellyfish"))
    (let* ((a 121)
           (b 200)
           (c (+ a (/ b a))))
      (assert-equal a 121)
      (assert-equal b 200)
      (assert-equal c (+ a (/ b a)))))

Notice how I've only changed the let statements, not the assert-equal comparisons.
Then again this is only speculation.

https://github.com/dongweiming/lisp-koans-answer/blob/master/koans/special-forms.lsp#L93

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.