You didn't define the datatype.
Shriram
On Mon, Sep 13, 2010 at 7:12 AM, wooks . wrote:
> Trying out the first example in the book
>
> #lang plai
> (define (parse sexp)
> (cond
> [(number? sexp) (num sexp)]
> [(list? sexp)
> (case (first sexp)
> [(+) (add (parse (second sex
Trying out the first example in the book
#lang plai
(define (parse sexp)
(cond
[(number? sexp) (num sexp)]
[(list? sexp)
(case (first sexp)
[(+) (add (parse (second sexp))
(parse (third sexp)))]
[(-) (sub (parse (second sexp))
(parse
2 matches
Mail list logo