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
0
votes
1 answer

RecursionError in Python Using Hylang

First off let me just say I know what I'm doing is not ideal, but I'm trying to write the member? function from The Little Schemer using Hy. (setv else True) (defn null? [lst] " If list is empty return True else False " (if lst False …
decabytes
  • 386
  • 2
  • 14
0
votes
1 answer

Why (car (1 2)) from The Little Schemer does not work in DrRacket?

I have been reading the first chapter of "The Little Schemer". The problem is, some examples work in DrRacket like (eq? "foo" "foo") and some don't like (car ("a" "b")) or (cdr ("a" "b")) because of application: not a procedure; expected a…
Feisty Otter
  • 134
  • 1
  • 8
0
votes
1 answer

little schemer drracket error cannot reference an identifier before its definition

beginner question, just started the little schemer book and installed DrRacket on my macbook to try some of the code examples. If I choose Racket language, the following code #lang Racket (define (atom? x) (and (not (pair? x)) (not (null?…
user3277841
  • 339
  • 2
  • 6
  • 17
0
votes
0 answers

Max-lisp-eval-depth in multirember function

In the book "the little schemer" fourth edition, in chapter 8 there is the function "multirember & co", I did it in the "emacs lisp" lenguage , resulting in the following problem: Emacs: nesting exceeds `max-lisp-eval-depth ' (defun multirember&co…
Rovaceni23
  • 19
  • 4
0
votes
1 answer

Is a lambda an atom in the book "the little schemer"?

I'm reading the 10th chapter of the book "The little schemer - 4th edition", which implements a simple schemer interpreter. All the other content is fine to me, except the function :atom? in Page 188: (define :atom? (lambda (x) (cond …
Freewind
  • 193,756
  • 157
  • 432
  • 708
0
votes
1 answer

"Mapping" Little Schemer to coderbyte challenge: Capitalize

After studying most of The Little Schemer, I've been trying my hand at some recursive solutions to Coderbyte challenges. After some fiddling I threw in cons and thought my upperConsIt would work to look through an array, find all of the instances of…
Gabriel Kunkel
  • 2,643
  • 5
  • 25
  • 47
0
votes
1 answer

Little Schemer Curry Example in Ruby

I'm trying to implement currying as per the the Little Schemer example eq? given below. eq( test, testFor) takes in a test condition and an atom and returns a function based on the passed function test, which takes one argument to return a…
Aman Gupta
  • 557
  • 1
  • 8
  • 23
1 2 3 4
5