#lang plai ;; login: (define-type Binding [binding (name symbol?) (named-expr WAE?)]) (define-type WAE [num (n number?)] [binop (op procedure?) (lhs WAE?) (rhs WAE?)] [with (lob (listof Binding?)) (body WAE?)] [id (name symbol?)]) ;; parse : expression -> WAE ; This procedure parses an expression into a WAE (define (parse sexp) (...)) ;; calc : WAE -> number ;; This procedure executes the WAE code and produces a numeric result (define (calc expr) (...))