Questions tagged [the-little-schemer]

**The Little Schemer**, a book on recursive programming by Daniel P. Friedman and Matthias Felleisen

The Little Schemer (original title: The Little Lisper) is a book by Daniel P. Friedman and Matthias Felleisen, designed to introduce the principles of recursive programming to an audience who may have no prior experience of programming or mathematics. All the examples are in the Scheme language but it is not intended as an introduction to Scheme (although it is based on lecture notes from an "Introduction to Scheme" mini course) and only uses that subset of the language necessary to implement solutions to the various tasks set in the book.

67 questions
68
votes
7 answers

What is ' (apostrophe) in Lisp / Scheme?

I am on day 1 hour 1 of teaching myself Scheme. Needless to say, I don't understand anything. So I'm reading The Little Schemer and using this thing: http://sisc-scheme.org/sisc-online.php as an interpreter. I need to use ' in for example (atom?…
jjerms
  • 1,095
  • 1
  • 10
  • 10
43
votes
2 answers

Help understanding Continuations in Scheme

I have been working alongside The Little Schemer to learn Scheme and using PLT-Scheme for my environment. The Little Schemer has helped me tremendously with recursion (it is straightforward for me now) but I'm stuck on a portion of the book that…
Ixmatus
  • 1,051
  • 9
  • 15
38
votes
2 answers

Y combinator discussion in "The Little Schemer"

So, I've spent a lot of time reading and re-reading the ending of chapter 9 in The Little Schemer, where the applicative Y combinator is developed for the length function. I think my confusion boils down to a single statement that contrasts two…
planarian
  • 2,047
  • 18
  • 18
31
votes
4 answers

Little Schemer and Racket

I'm starting to read the Little Schemer and now instead of PLT Scheme we have Racket. I would like to know if Racket is suitable for doing the exercises in the book or do I need to get another true Scheme compiler. Before I forgot to tell you, my OS…
Marcote
  • 2,977
  • 1
  • 25
  • 24
21
votes
7 answers

Explain the continuation example on p.137 of The Little Schemer

The code in question is this: (define multirember&co (lambda (a lat col) (cond ((null? lat) (col (quote ()) (quote ()))) ((eq? (car lat) a) (multirember&co a (cdr lat) (lambda…
nweiler
  • 1,140
  • 1
  • 13
  • 23
21
votes
4 answers

The Little Schemer - Where to start?

I just cracked open The Little Schemer, and I feel like I'm missing something. The first question asks "Is it true that this is an atom?", but I do not see any definition of what an atom is. I suppose I can derive what an atom is by the answers…
19
votes
11 answers

Which environment, IDE or interpreter to put in practice Scheme?

I've been making my way through The Little Schemer and I was wondering what environment, IDE or interpreter would be best to use in order to test any of the Scheme code I jot down for myself.
t3rse
  • 10,024
  • 11
  • 57
  • 84
19
votes
6 answers

Why all the lambdas in The Little Schemer?

After learning a bit of Scheme from SICP, I started reading The Little Schemer (which I find quite entertaining) and am about one fourth done. I noticed that I can write many (most? all?) solutions without using lambda whereas The Little Schemer…
André
  • 914
  • 1
  • 10
  • 23
15
votes
2 answers

How can I clear the interpreter screen in Dr. Racket IDE?

Just starting into The Little Schemer, and have a very basic Dr. Racket IDE question: How can I clear the interpreter screen? How can I set the up arrow to display the previously-typed items (like in Bash) rather than the current behavior of…
i_made_that
  • 941
  • 1
  • 8
  • 19
15
votes
4 answers

The Little Schemer evens-only*&co

I'm having difficulty understanding what's going on with The Little Schemer's evens-only*&co example on page 145. Here's the code: (define evens-only*&co (lambda (l col) (cond ((null? l) (col '() 1 0)) ((atom? (car l)) (cond …
13
votes
2 answers

Recursion over a list of s-expressions in Clojure

To set some context, I'm in the process of learning Clojure, and Lisp development more generally. On my path to Lisp, I'm currently working through the "Little" series in an effort to solidify a foundation in functional programming and…
12
votes
3 answers

What is the definition of "natural recursion"?

The Third Commandment of The Little Schemer states: When building a list, describe the first typical element, and then cons it onto the natural recursion. What is the exact definition of "natural recursion"? The reason why I am asking is because I…
Aadit M Shah
  • 72,912
  • 30
  • 168
  • 299
8
votes
2 answers

How do collector functions work in Scheme?

I am having trouble understanding the use of collector functions in Scheme. I am using the book "The Little Schemer" (by Daniel P. Friedman and Matthias Felleisen). A comprehensive example with some explanation would help me massively. An example of…
CPUFry
  • 566
  • 4
  • 18
8
votes
2 answers

The Little Schemer: What is a function or argument's structure?

In Chapter 3 of The Little Schemer, the answer to the question of why we don't simplify the rember function right away is "because then a function's structure does not coincide with its argument's structure." I'm having trouble understanding what a…
8
votes
2 answers

Little Schemer eqlist? function - alternate version?

I'm going through the "Little Schemer" book, and doing the various functions. Generally I end up with the same version as the books, but not for eqlist?, which is a function to test the equality of two lists. I've tried testing my version and it…
JDelage
  • 13,036
  • 23
  • 78
  • 112
1
2 3 4 5