the-little-schemer

Syntax changes from the examples in 'The Little Schemer' to the real Scheme

I have recently started following the examples from The Little Schemer and when trying out the examples in DrScheme, I have realised that there are some minor syntax changes from the examples in the book to what I can write in DrScheme. First of all, as a language in DrScheme, I chose Pretty Big (one of the Legacy Languages). Is this th...

Scheme: Why is there the need to use a cond here?

I tried to write a (simple, i.e. without eqan?) one? function like such: (define one? (lambda (n) ((= 1 n)))) But the above doesn't work though because when I call it like such: (one? 1) I get greeted with this error: procedure application: expected procedure, given: #t (no arguments) The correct way (from The Little Sch...

Scheme implementations - what does it mean?

Hi, I'm a beginning student in CS, and my classes are mostly in Java. I'm currently going through "Little Schemer" as a self study, and in the process of finding out how to do that I have found numerous references to "implementations" of Scheme. My question is, what are implementations? Are they sub-dialects of Scheme, or is that som...

Little Schemer eqlist? function - alternate version?

Hi, 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 passes anything I throw at it. Yet it's slightly different from the "Little Schemer" ...

Why does this work in DrRacket but not in Racket from the console

(define pick (lambda (num lat) (cond ((null? lat) (quote())) ((= (sub1 num) 0) (car lat)) (else (pick (sub1 num) (cdr lat)))))) (define brees (quote (a b c d e touchdown g h i))) (pick 6 brees) The language in DrRacket is set to Advanced Student. It also works fine in the IronScheme...

After "The Little Schemer", what's next?

So I just read The Little Schemer and found it really good! I had no prior functional programming background, apart from the "infamous" parenthesis myth I so much heard about Lisp :P I found it an amazing read and now I'm starving for more. However, after searching a bit, I found this post about a Scheme Bookshelf. In that, the author s...