Changeset 15326 in project


Ignore:
Timestamp:
08/05/09 15:42:39 (10 years ago)
Author:
svnwiki
Message:

Changes applied for Sam Varner (209.136.134.158) through svnwiki:

Formatted code example so that it's all in the same box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/4/Modules and macros

    r15058 r15326  
    416416are defined and used:
    417417
    418 ;; hello.scm
    419 
    420 (module test (hello greet)
    421   (import scheme)
    422 
    423   (define-syntax greet
    424     (syntax-rules ()
    425       ((_ whom)
    426        (begin
    427         (display "Hello, ")
    428         (display whom)
    429         (display " !\n") ) ) ) )
    430 
    431   (define (hello)
    432     (greet "world") )  )
     418 ;; hello.scm
     419 
     420 (module test (hello greet)
     421   (import scheme)
     422 
     423   (define-syntax greet
     424     (syntax-rules ()
     425       ((_ whom)
     426        (begin
     427          (display "Hello, ")
     428          (display whom)
     429          (display " !\n") ) ) ) )
     430 
     431   (define (hello)
     432     (greet "world") )  )
    433433
    434434The module {{test}} exports one value ({{hello}}) and one syntax
Note: See TracChangeset for help on using the changeset viewer.