130 likes | 239 Views
GE. f:. P1. para:x body:(if … ). (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))). GE. f:. foo:. P1. P2. para:x body:(if … ). para:bar,x,y body :(let … ). (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))).
E N D
GE f: P1 para:x body:(if … ) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y))))
GE f: foo: P1 P2 para:x body:(if … ) para:bar,x,y body:(let … ) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y))))
GE f: foo: P1 P2 bar:P1 x:1 y:-2 para:x body:(if … ) para:bar,x,y body:(let … ) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 para:x body:(if … ) para:bar,x,y body:(let … ) Evaluating: (bar y) => (P1 -2) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 para:x body:(if … ) para:bar,x,y body:(let … ) Evaluating: (bar y) => (P1 -2) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 para:x body:(if … ) para:bar,x,y body:(let … ) Evaluating: (if (< x 0) … ) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 para:x body:(if … ) para:bar,x,y body:(let … ) P3 para:y body:(- y x) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 para:x body:(if … ) para:bar,x,y body:(let … ) P3 para:y body:(- y x) g: (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 para:x body:(if … ) para:bar,x,y body:(let … ) P3 para:y body:(- y x) g: Evaluating: (g x) => (P3 1) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 y:1 para:x body:(if … ) para:bar,x,y body:(let … ) P3 Evaluating: (- y x) => 3 para:y body:(- y x) g: (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 y:1 para:x body:(if … ) para:bar,x,y body:(let … ) P3 para:y body:(- y x) g: Evaluating: (g y) => (P3 -2) (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 y:1 para:x body:(if … ) para:bar,x,y body:(let … ) P3 y:-2 Evaluating: (- y x) => 0 para:y body:(- y x) g: (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)
GE f: foo: P1 P2 bar:P1 x:1 y:-2 x:-2 y:1 para:x body:(if … ) para:bar,x,y body:(let … ) P3 y:-2 para:y body:(- y x) g: Evaluating: (+ 3 0) => 3 (define (f x) (if (< x 0) (lambda (y) (- y x)) (lambda (y) (- x y)))) (define (foo bar x y) (let ((g (bar y))) (+ (g x) (g y)))) (foo f 1 -2)