[plt-scheme] scribble: defform* can't define multiple id's?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Feb 15 19:31:12 EST 2008

At Fri, 15 Feb 2008 16:20:14 -0800, John Clements wrote:
> The defform* form is specifically documented to require that all of  
> its forms use the same id, unlike defproc*.  Is there a reason why  
> this has to be the case?
>
> For instance, from handin-server.scrbl, I'd like to write this:
> 
> @defform*[((!integer id)
>             (!integer* expr))]{
> 
>    Similar to @scheme[!procedure] and @scheme[!procedure*] for  
> integers.}
> 
> ... sure, I can break this up into two defforms, but it's harder to  
> read. Is there some reason not to allow the same thing that defproc*  
> does?

Use `deftogether':

 @deftogether[(
 @defform[(!integer id)]
 @defform[(!integer* expr)]
 )]{

    Similar to @scheme[!procedure] and @scheme[!procedure*] for  
  integers.}


That's why `defform*' requires a singe identifier: I realized that we
want the more general `deftogether' before I got around to extending
`defform*'.

Matthew



Posted on the users mailing list.