2003-02-11 19:23:30 -05:00
|
|
|
; Copyright (c) 2003 RT Happe <rthappe at web de>
|
|
|
|
; See the file COPYING distributed with the Scheme Untergrund Library
|
|
|
|
|
2003-02-12 16:48:40 -05:00
|
|
|
;; the basic protocol including a vanilla constructor
|
2003-02-11 19:23:30 -05:00
|
|
|
(define-interface sequence-basics-face
|
|
|
|
(export sequence?
|
|
|
|
sequence-length
|
|
|
|
sequence-ref
|
|
|
|
sequence-set!
|
|
|
|
make-another-sequence))
|
|
|
|
|
|
|
|
;; things definable in terms of the basic protocol
|
|
|
|
(define-interface sequence-extras-face
|
|
|
|
(export sequence->list
|
|
|
|
sequence-fill!
|
|
|
|
subsequence
|
2003-02-12 16:48:40 -05:00
|
|
|
sequence-copy
|
|
|
|
sequence-append
|
|
|
|
sequence-map
|
|
|
|
sequence-for-each
|
|
|
|
sequence-fold
|
|
|
|
sequence-every
|
|
|
|
sequence-every/bounds))
|
2003-02-11 19:23:30 -05:00
|
|
|
|
|
|
|
;; specialised versions of sequence operations
|
|
|
|
(define-interface sequence-specifics-face
|
|
|
|
(export make-list
|
|
|
|
list-set!
|
|
|
|
list-fill!
|
|
|
|
sublist))
|
|
|
|
|
|
|
|
;; the sequence ADT etc.
|
|
|
|
(define-interface behaved-sequences-face
|
|
|
|
(export make-sequence-type
|
|
|
|
make-behaved-sequence-record
|
|
|
|
behaved-sequence:type
|
|
|
|
make-behaved-sequence
|
|
|
|
behaved-sequence?
|
|
|
|
behaved-sequence-ref
|
|
|
|
behaved-sequence-set!
|
|
|
|
behaved-sequence-length))
|