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

19 lines
285 B
Scheme

; 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))