sunterlib/s48/sequences/interfaces.scm

97 lines
2.7 KiB
Scheme
Raw Normal View History

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
2003-03-20 14:09:05 -05:00
sequence-tabulate!
2003-02-11 19:23:30 -05:00
sequence-fill!
subsequence
2003-02-12 16:48:40 -05:00
sequence-copy
2003-03-22 17:22:15 -05:00
sequence-copy!
2003-02-15 19:32:31 -05:00
sequence-copy/maker
2003-02-12 16:48:40 -05:00
sequence-append
2003-02-13 19:47:58 -05:00
sequence-map sequences-map
2003-02-15 19:32:31 -05:00
sequence-map/maker sequences-map/maker
2003-03-22 17:22:15 -05:00
sequence-map-into! sequences-map-into!
2003-02-13 19:47:58 -05:00
sequence-for-each sequences-for-each
sequence-fold sequences-fold
sequence-fold-right sequences-fold-right
2003-03-22 17:22:15 -05:00
sequence-null?
2003-02-13 19:47:58 -05:00
sequence-any sequences-any
2003-03-13 13:38:28 -05:00
sequence-every sequences-every
sequence= sequences=
))
2003-02-11 19:23:30 -05:00
2003-02-13 19:47:58 -05:00
;; specialised sequence operations (for lists, actually)
2003-02-11 19:23:30 -05:00
(define-interface sequence-specifics-face
2003-02-13 19:47:58 -05:00
(export list-set!
2003-02-11 19:23:30 -05:00
list-fill!
2003-02-13 19:47:58 -05:00
sublist
))
2003-02-11 19:23:30 -05:00
;; the sequence ADT etc.
2003-02-15 19:32:31 -05:00
(define-interface absequences-face
(export make-sequence-behavior
sequence-behavior?
make-absequence-record
absequence:behavior
make-absequence/behavior
absequence/behavior
list->absequence/behavior
absequence?
absequence-ref
absequence-set!
absequence-length))
2003-02-13 19:47:58 -05:00
;; the basic + extra sequence procedures
2003-03-13 13:38:28 -05:00
;; [ extends the union of SEQUENCE-BASICS- and -EXTRAS-INTERFACE with
;; `VECTOR' replacing `SEQUENCE' ]
2003-02-13 19:47:58 -05:00
(define-interface vector-lib-face
2003-03-20 14:09:05 -05:00
(export ;; constructors and the like
2003-02-13 19:47:58 -05:00
make-vector
2003-03-20 14:09:05 -05:00
vector
list->vector ; with opts
vector-tabulate
2003-02-13 19:47:58 -05:00
;; basics w/o the vanilla constructor
vector?
vector-length
vector-ref
vector-set!
;; extras
vector->list
vector-fill!
2003-03-20 14:09:05 -05:00
vector-tabulate!
2003-02-13 19:47:58 -05:00
subvector
vector-copy
2003-03-22 17:22:15 -05:00
vector-copy!
2003-02-13 19:47:58 -05:00
vector-append
2003-03-13 13:38:28 -05:00
vector-map ; forget the optional MAKER arg
2003-03-22 17:22:15 -05:00
vector-map-into!
2003-02-13 19:47:58 -05:00
vector-for-each
vector-fold
vector-fold-right
2003-03-22 17:22:15 -05:00
vector-null?
2003-02-13 19:47:58 -05:00
vector-any
vector-every
2003-03-13 13:38:28 -05:00
vector=
2003-02-15 19:32:31 -05:00
vectors-map ; but not vectors-map/maker
2003-03-22 17:22:15 -05:00
vectors-map-into!
2003-02-13 19:47:58 -05:00
vectors-for-each
vectors-fold
vectors-fold-right
vectors-any
vectors-every
2003-03-13 13:38:28 -05:00
vectors=
2003-02-13 19:47:58 -05:00
))