Changes between Version 3 and Version 4 of ModulesShinn


Ignore:
Timestamp:
10/25/10 11:25:59 (7 years ago)
Author:
alexshinn
Comment:

adding an example

Legend:

Unmodified
Added
Removed
Modified
  • ModulesShinn

    v3 v4  
    188188WG2 will likely need to address phasing issues, and provide the 
    189189equivalent of the R6RS `for` form. 
     190 
     191== Example == 
     192 
     193The stack library from the R6RS specification: 
     194 
     195{{{ 
     196  (library (stack) 
     197    (export make push! pop! empty!) 
     198    (import (rnrs)) 
     199    (body 
     200     (define (make) (list ’())) 
     201     (define (push! s v) (set-car! s (cons v (car s)))) 
     202     (define (pop! s) 
     203       (let ((v (caar s))) 
     204         (set-car! s (cdar s)) 
     205         v)) 
     206     (define (empty! s) (set-car! s ’())))) 
     207}}} 
    190208 
    191209== Issues ==