6.11.0.4

Week 13 Set c

home work!

Programming Language Racket

Due Date Fri at 9:00pm (Week 13)

Purpose to get a first taste of Racket’s syntax transformations

Finger Exercises

Exercise 1 Design the Racket syntax transformer ef, which transforms an ef expression into a semantically equivalent cond expression.

An ef expression has the same shape and meaning as an if expression in Racket, , except that it uses the keyword ef instead of if.

Exercise 2 Design the Racket syntax transformer +local, which transforms a +local expressions into semantically equivalent immediate application of a lambda expression.

See problem 2 in Week 13 Set a.

Graded Exercises

Exercise 3 Design Racket syntax transformer my-cond. Its transforms an my-cond expression into a semantically equivalent Racket expression without using cond.

Exercise 4 Design the syntax transformer function fun, which transforms the a multi-argument fun expression into a nest of one-argument lambda expressions.

A fun expression has the same shape as a lambda expression, except that it uses the keyword fun instead of lambda.