5 ms·
You are correct, but I don't know that the author is interested in fixing it, since the web page was published so long ago that the author could have since had
by harryjo 12y ago
You are correct, but I don't know that the author is interested in fixing it, since the web page was published so long ago that the author could have since had a child who is now capable of writing something like
http://learnlispthehardway.org/try-lisp/ http://learnlispthehardway.org/try-lisp/
that is accessible to modern humans.
- sde 12y agoThat seems better. However, the return values were almost too dark to read while there's daylight, and I got only eight commands into it before I found an error. (mod -3 5) returns -3. I don't know if that error is just in this implementation, or in many versions of Common Lisp, but a quick search shows there are versions of Common Lisp where mod is implemented correctly. (In mathematics, -3 = 2 modulo 5, or equivalently (-3 mod 5) = 2. Even Python knows that -3 % 5 == 2, where '%' is Python's modulus operator.)