[racket] htdp: functions of section 19 violate the grammar of section 8

From: Daniel Bastos (dbastos at toledo.com)
Date: Wed Sep 10 13:02:14 EDT 2014

I have not been able to verify this statement.

  "As a matter of fact, the functions of section 19 violate the Scheme
grammar of section 8." -- First paragraph of section 20.

I think the statement is referring to functions such as filter1.

(define (filter1 rel-op alon t)
  (cond
    [(empty? alon) empty]
    [else (cond
   [(rel-op (first alon) t)
    (cons (first alon)
          (filter1 rel-op (rest alon) t))]
   [else
    (filter1 rel-op (rest alon) t)])]))

It must be because of rel-op, I figure. But rel-op is a <var>.
According to Figure 21 (the grammar of section 8), (<var> <exp>
...<exp>) is an <exp>, so I think filter1 doesn't violate the grammar
of section 8.

Where am I wrong? Thank you!

Posted on the users mailing list.