2014-07-15 07:59:29 -04:00
|
|
|
(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)
|
2014-07-15 08:26:08 -04:00
|
|
|
(write (array-pop! ary))
|
2014-07-15 07:59:29 -04:00
|
|
|
(newline)
|
2014-07-15 08:26:08 -04:00
|
|
|
(write (array-pop! ary))
|
2014-07-15 07:59:29 -04:00
|
|
|
(newline)
|
2014-07-15 08:26:08 -04:00
|
|
|
(write (array-pop! ary))
|
|
|
|
(newline)
|
|
|
|
|
|
|
|
(write ary)
|
|
|
|
(newline)
|
|
|
|
(array-unshift! ary 1)
|
|
|
|
(write ary)
|
|
|
|
(newline)
|
|
|
|
(array-unshift! ary 2)
|
|
|
|
(write ary)
|
|
|
|
(newline)
|
|
|
|
(array-unshift! ary 3)
|
|
|
|
(write ary)
|
|
|
|
(newline)
|
|
|
|
(write (array-shift! ary))
|
|
|
|
(newline)
|
|
|
|
(write (array-shift! ary))
|
|
|
|
(newline)
|
|
|
|
(write (array-shift! ary))
|
2014-07-15 07:59:29 -04:00
|
|
|
(newline)
|
|
|
|
|