Hand Evals in DrScheme-PowerPoint

Hand Evals in DrScheme-PowerPoint - [see next slide]...

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

View Full Document Right Arrow Icon
Hand Evals in DrScheme Hand evaluation helps you learn how Scheme reduces programs to values
Background image of page 1

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

View Full DocumentRight Arrow Icon
Example 1 (+ (* 2 3) 6) (+ 6 6) 12
Background image of page 2
Example 2 (define (foo x) (+ x 3)) (* (foo 5) 4) (* (+ 5 3) 4) (* 8 4) 32
Background image of page 3

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

View Full DocumentRight Arrow Icon
Example 3 (define (foo x) (+ x 3)) (+ (foo 5) (foo 9) (foo -1)) (+ (+ 5 3) (foo 9) (foo -1)) (+ 8 (foo 9) (foo -1)) (+ 8 (+ 9 3) (foo -1)) (+ 8 12 (foo -1))
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [see next slide] Example 3 (cont) (define (foo x) (+ x 3)) (+ 8 12 (foo -1)) (+ 8 12 (+ -1 3)) (+ 8 12 2) 22 Example 4 (cond [(= 5 0) never] [else (* 6 2)]) (* 6 2) 12 Summary: How to Hand Eval 1. Find the innermost expression 2. Evaluate one step 3. Repeat until all have a value...
View Full Document

This note was uploaded on 02/06/2008 for the course CS 1102 taught by Professor Fisler during the Fall '07 term at WPI.

Page1 / 7

Hand Evals in DrScheme-PowerPoint - [see next slide]...

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

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