Discuss (30m)

Questions you may want to consider:

1. Why do we need structures when we have things like lists?

2. Propose structure definitions that could represent: 

  • A function definition in Scheme; for example, 
  (define (square x) (* x x))

  • A function application in Scheme; for example,

  (square 42)

 • An if statement.

Find a partner to discuss your definitions with; argue to consensus what you think is the clearest set of structure definitions you might use in an interpreter. Present this to your instructor or TA before proceeding.

Note to Future Self: This discussion pushed students ahead; not everyone saw the connection of "code as data" right away. That said, it is where we going—so this became a brief mini-lecture on code-as-data. Not sure if that was good or not.

Creative Commons License This work is licensed under a Creative Commons BY-SA 3.0 License.