DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(r5rs.info.gz) Definitions

Info Catalog (r5rs.info.gz) Programs (r5rs.info.gz) Program structure (r5rs.info.gz) Syntax definitions
 
 5.2 Definitions
 ===============
 

Menu

 
* Top level definitions
* Internal definitions
 
 Definitions are valid in some, but not all, contexts where expressions
 are allowed.  They are valid only at the top level of a <program> and
 at the beginning of a <body>.
 
 A definition should have one of the following forms: 
 
    * (define <variable> <expression>)
 
    * (define (<variable> <formals>) <body>)
 
      <Formals> should be either a sequence of zero or more variables,
      or a sequence of one or more variables followed by a
      space-delimited period and another variable (as in a lambda
      expression).  This form is equivalent to
 
 
           (define <variable>
             (lambda (<formals>) <body>)).
 
    * (define (<variable> . <formal>) <body>)
 
      <Formal> should be a single variable.  This form is equivalent to
 
 
           (define <variable>
             (lambda <formal> <body>)).
 
 
Info Catalog (r5rs.info.gz) Programs (r5rs.info.gz) Program structure (r5rs.info.gz) Syntax definitions
automatically generated byinfo2html