lecture14-sketch - define make-count (let ((glob 0))...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
*
Background image of page 2
) define (make-adder n) lambda (x) (+ x n))) define 3+ (make-adder 3)) define n 7) (3+ n)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
) define (make-adder n) (lambda (x) (+ x n))) define 3+ (make-adder 3)) define n 7) (3+ n)
Background image of page 4
;;;; In file cs61a/lectures/3.2/count4.scm
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: define make-count (let ((glob 0)) (lambda () (let ((loc 0)) (set! loc (+ loc 1)) (set! glob (+ glob 1)) (list loc glob))))))...
View Full Document

Page1 / 5

lecture14-sketch - define make-count (let ((glob 0))...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online