4 ms·
SICP language in racket lacks 1+ and -1+ (increment and decrement), last I checked. So it does still need some modification.
by vats 6y ago
SICP language in racket lacks 1+ and -1+ (increment and decrement), last I checked. So it does still need some modification.
- soegaard 6y agoAre those actually used in the book? But if needed, the user can write: (define (1+ x) (+ x 1)) (define (1- x) (- x 1)) Although, I think, add1 and sub1 are more common nowadays.
- jgwil2 6y agoPretty sure that example comes from the first edition. #lang sicp is made to work with the second edition I assume.