python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How are Scheme closures formally defined?
I’ve recently ventured into the awesome land of writing a Scheme interpreter, and I’ve run into a roadblock: closures. From what I understand, they encapsulate a local environment with a procedure tha...
TheSinisterStone
Votes: 0
Answers: 2
Why does this arithmetic code return lists?
I'm currently working my way through exercise 3.17 of SICP. I know that I'm messing it up and I intend to fix that later. I will not link the exercise, as it is not relevant. This was one of my attemp...
J. Mini
Votes: 0
Answers: 1
About "Frames as Repository of Local State"
SICP, Exercise 3.10 in section 3.2.3 shows the following as an alternative to a previously defined make-withdraw:
(define (make-withdraw initial-amount)
(let ((balance initial-amount))
(lambda (...
Enlico
Votes: 0
Answers: 1
Every solution that I've seen for SICP Exercise 3.16 appears to cheat by creating more than three pairs. Where is my misunderstanding?
SICP Exercise 3.16 gives the reader a broken procedure for counting the numbers of pairs in a list structure:
(define (count-pairs x)
(if (not (pair? x))
0
(+ (count-pairs (car x))
...
J. Mini
Votes: 0
Answers: 1