scsh-0.6/ps-compiler/prescheme/test/cell.scm

19 lines
285 B
Scheme
Raw Normal View History

2003-05-01 06:21:33 -04:00
; Copyright (c) 1994 by Richard Kelsey. See file COPYING.
(define *count* 0)
(define (increment)
(set! *count* (+ *count* 1)))
(define (value)
*count*)
(define (test out)
(increment)
(increment)
(write-number (value) out)
(newline out))
(test (current-output-port))