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

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

I remember having had that question when I was at that chapter. I must
have thought I answered it, but I'm having it again and unable to
answer now. IOW, I'm confused.

I'm having difficulties with this phrase too. "First, the names of
functions and primitive operations are used as arguments in
applications."

What is an argument in application? I'm going to try to answer it. An
application is, according to the grammar of section 8,

   (<var> <exp> ...<exp>)

or

  (<prm> <exp> ...<exp>)

So its arguments are <var>, <exp>, ... and the final <exp>. Similarly,
the second application has arguments <prm>, <exp>, ..., <exp>. Is that
correct?

Thank you.

On Wed, Sep 10, 2014 at 3:25 PM, Stephen Chang <stchang at ccs.neu.edu> wrote:
> I believe it's answered in a subsequent paragraph?
>
> "The abstract functions of section 19 violate Scheme's basic grammar
> in two ways. First, the names of functions and primitive operations
> are used as arguments in applications. An argument, though, is an
> expression, and the class of expressions does not contain primitive
> operations and function names. It does contain variables, but we
> agreed that they are only those variables mentioned in variable
> definitions and as function parameters. Second, parameters are used as
> if they were functions, that is, the first position of applications.
> But the grammar of section 8 allows only the names of functions and
> primitive operations in this place."

Posted on the users mailing list.