picrin/t/array.scm

25 lines
354 B
Scheme

(import (scheme base)
(scheme write)
(picrin array))
(define ary (make-array))
(write ary)
(newline)
(array-push! ary 1)
(write ary)
(newline)
(array-push! ary 2)
(write ary)
(newline)
(array-push! ary 3)
(write ary)
(newline)
(write (array-ref ary 0))
(newline)
(write (array-ref ary 1))
(newline)
(write (array-ref ary 2))
(newline)