the-little-schemer Questions
2
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 som...
Radiate asked 26/11, 2016 at 13:58
4
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? ...
Mckay asked 21/5, 2012 at 20:51
7
Solved
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 (new...
Unutterable asked 10/8, 2011 at 0:29
2
Solved
In the book The little schemer, we find this function that only supports lists with length smaller than or equal to 1:
(((lambda (mk-length) ; A.
(mk-length mk-length))
(lambda (mk-length)
(la...
Penelopa asked 3/4, 2015 at 16:22
2
Solved
In The Little Schemer book, in Chapter 9, while building a length function for arbitrary long input, the following is suggested (on pages 170-171), that in the following code snippet (from page 168...
Bubble asked 29/12, 2017 at 6:49
2
Solved
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...
Guillot asked 4/3, 2010 at 11:6
2
Solved
Suppose l is defined as follows:
> (define l (list 1 2 3))
l is now bound to a list of atoms.
Little Schemer introduces a simple function called lat? which evaluates to #t or #f depending on...
Merridie asked 24/2, 2016 at 20:43
3
Solved
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 "natu...
Elective asked 27/8, 2015 at 22:26
4
Solved
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...
Enfleurage asked 22/10, 2012 at 1:14
2
Solved
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 ...
Jeniferjeniffer asked 31/7, 2015 at 0:3
11
Solved
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.
Nibelungenlied asked 12/9, 2008 at 16:23
7
Solved
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 ...
Jann asked 8/10, 2009 at 16:58
2
Solved
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 (lik...
Escalera asked 21/5, 2014 at 19:32
4
Solved
I am reading the The Little Schemer book by Daniel Friedman. I don't understand why every function in the book is written with a lambda expression.
(define fun1
(lambda (x1 x2)
(+ x1 x2)))
(def...
Villalba asked 30/12, 2013 at 6:41
1
Solved
The little schemer gives the following on page 165 as still the function length0. But how does this work? It looks like the length lambda is being passed to the mk-length lambda, which evaluates th...
Baca asked 1/11, 2013 at 4:31
2
Solved
I'm reading The Little Schemer and feel confused about the following code:
((lambda (len)
(lambda (l)
(cond
((null? l) 0)
(else
(+ 1 (len (cdr l)))))))
eternity)
(define eternity
(lambda ...
Remindful asked 23/10, 2013 at 14:31
4
Solved
In The Little Schemer there is a function to check, whether the list is flat:
(define lat?
(lambda (l)
(cond
((null? l) #t)
((atom? (car l)) (lat? (cdr l)))
(else #f))))
I'm trying to write...
Unstrap asked 16/4, 2013 at 14:25
4
Solved
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 su...
Aspidistra asked 29/8, 2013 at 12:6
3
Solved
I'm trying to go through "The Little Lisper" and already running into snags in the first chapter. I'm relatively new to Emacs (which has fueled my interest in learning Lisp and clojure). I download...
Seeto asked 5/6, 2013 at 6:3
1
Solved
I've spent a day reading page 166's length≤1 in the book The Little Schemer; there's the following code:
(((lambda (mk-length)
(mk-length mk-length))
(lambda (mk-length)
(lambda (l)
(cond
((n...
Nganngc asked 24/9, 2012 at 11:22
1
Solved
On page 41 after simplification of the rember function, there is a question-respond that I don't understand very well.
Q: So why don't we simplify right away?
R: Because then a function's structu...
Filide asked 13/9, 2012 at 3:26
2
Solved
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 boil...
Pontoon asked 8/5, 2012 at 13:24
6
Solved
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...
Supernova asked 24/1, 2011 at 1:42
2
Solved
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 fo...
Parthenos asked 8/11, 2011 at 4:9
3
Solved
I'm going through The LIttle Schemer to learn Scheme (as an old C programmer) and as an exercise I tried to write a procedure to flatten a list using only the forms in The Little Schemer; I.e., def...
Gottlieb asked 5/9, 2011 at 23:29
1 Next >
© 2022 - 2024 — McMap. All rights reserved.