Programming Book: The Little Schemer
I'm having fun going through a computer-programming book called The Little Schemer. It consists of dozens of exercises that you solve using little snippets of recursive code. It definitely has the feel of a game - Sudoku moreso than Call of Duty.
The key to enjoying this book is to not get hung up on the non-code questions. The book is written as a list of questions and answers, and it's frustrating to try to answer the non-code questions because they are often unguessable:
Q: Is that bad?
A: You must beware of shadows
Quickly read through the non-code questions and answers. But try to answer the code questions - that's the stuff that's fun and interesting.
Q: Write fun? with set? and firsts
A:
You'll find pencil and paper to be too slow for this stuff; a text editor is more convenient. But you need not bother running the code through a compiler - the answers are given on the same page.
The key to enjoying this book is to not get hung up on the non-code questions. The book is written as a list of questions and answers, and it's frustrating to try to answer the non-code questions because they are often unguessable:
Q: Is that bad?
A: You must beware of shadows
Quickly read through the non-code questions and answers. But try to answer the code questions - that's the stuff that's fun and interesting.
Q: Write fun? with set? and firsts
A:
(define fun? (lambda (rel) (set? (firsts rel))))
You'll find pencil and paper to be too slow for this stuff; a text editor is more convenient. But you need not bother running the code through a compiler - the answers are given on the same page.
2 Comments:
Did you know the Scheme Workshop, 2008 will be in Victoria this fall?
... Dan
By Unknown, at 7/02/2008 3:33 p.m.
Cool!
By Jonathan, at 7/02/2008 7:59 p.m.
Post a Comment
<< Home