The Vivid Schemer


Think Recursively, Easily.

The Little Schemer is a book teaching you to think recursively. The way to use it is to read a question, think about the question, and come up with an answer.

The Vivid Schemer turns the Q&As in black and white into a live conversation on the screen, which can guide you to think in the right path.

If you are not yet familiar with Scheme, use this guide.

You can also embed the Vivid Schemer in your web page.


What's the answer to Life, the Universe and Everything?


* Thank you. Douglas Adams.


The Little Schemer

1 Toys

3 Cons the Magnificent

5 *Oh My Gawd*: It's Full of Stars

7 Friends and Relations

9 ... and Again, and Again, and Again, ...

Others

2 Do It, Do It Again, and Again, and Again

4 Numbers Games

6 Shadows

8 Lambda the Ultimate

10 What Is the Value of All of This?


A Quick Guide to Scheme

Don't worry if you didn't know very much about Scheme. Learning only a small part of it is enough to play with The Vivid Schemer.

Syntax

Example Semantics
17 17 is a number.
(quote (yesterday once more)) Return the (yesterday once more) literally without evaluating it.
(cond ((< 2 1) #t) (else #f)) Ask the first question (< 2 1). If the answer is true, evaluate the expression #t. Otherwise, ask the second question else. Else is always true, so return the value of evaluating #f.
(define square (lambda (x) (* x x))) Define a new variable square and give it the value of evaluating the expression (lambda (x) (* x x))).
(lambda (r) (* 3.14 (* r r))) Create a function with a parameter named r and the expression (* 3.14 (* r r))) as body.
(begin (...) (...)) Evaluate expressions in left-to-right order, and return the final value.
(square 12) Call a function named square with 12 as the parameter.

More Examples

Embed

Insert your code and press generate, then copy the generated code to your site.



But what is "thinking recursively"?