[racket] web applications example problem

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Jul 26 13:22:49 EDT 2010

On Jul 26, 2010, at 1:13 PM, Sean Allen wrote:

> (define-struct post (title body))
>
> (struct	post (title body)  #:extra-constructor-name make-post)

These two lines have nearly the same meaning. They define a struct  
called post, aka struct:post. When you define the same thing twice in  
a module, Racket complains. I doubt this ever worked.


> title : string?
> body : string?

I don't understand these two lines. Neither title nor body are  
identifiers you have defined in your module/program. (You have fields  
named that, but that's all.) The ':' isn't a syntactically legitimate  
token.



Posted on the users mailing list.