Download presentation
Presentation is loading. Please wait.
Published byGenevieve Cleere Modified over 9 years ago
1
(define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) GE f: P1 para:x body:(if … )
2
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … )
3
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2
4
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 Evaluating: (bar y) => (P1 -2)
5
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 x:-2 Evaluating: (bar y) => (P1 -2)
6
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 x:-2 Evaluating: (if (< x 0) … )
7
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 x:-2 P3 para:y body:(- y x)
8
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 g: x:-2 P3 para:y body:(- y x)
9
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 g: x:-2 P3 para:y body:(- y x) Evaluating: (g x) => (P3 1)
10
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 g: x:-2 P3 para:y body:(- y x) y:1 Evaluating: (- y x) => 3
11
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 g: x:-2 P3 para:y body:(- y x) y:1 Evaluating: (g y) => (P3 -2)
12
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 g: x:-2 P3 para:y body:(- y x) y:1 y:-2 Evaluating: (- y x) => 0
13
(define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (foo f 1 -2) GE f:foo: P1P2 para:x body:(if … ) para:bar,x,y body:(let … ) bar:P1 x:1 y:-2 g: x:-2 P3 para:y body:(- y x) y:1 y:-2 Evaluating: (+ 3 0) => 3
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.