stated relations between vector, string, list, general sequence procedures
This commit is contained in:
parent
6863cce44f
commit
bcb960f956
|
@ -108,9 +108,32 @@ the maker of the actual type of the (first) sequence argument.
|
|||
Sequence arguments of vector and absequence procedures must be vectors
|
||||
resp. absequences, notwithstanding the generic parameter name S used below.
|
||||
Sequence arguments of general sequence procedures may have different
|
||||
actual sequence types, e.g. (SEQUENCE-EVERY CHAR=? "abc" '#(#\a)) is
|
||||
actual sequence types, e.g. (SEQUENCES-EVERY CHAR=? "abc" '#(#\a)) is
|
||||
ok since both String and Vector <= Sequence.
|
||||
|
||||
Equivalences
|
||||
as far as the specs go, that is: the equivalences don't extend to
|
||||
unspecified behaviour but I didn't bother to spell this out in detail.
|
||||
The stated equivalences may have to suffer from exceptions as the
|
||||
library grows, but please report deviations anyway.
|
||||
|
||||
* (sequences-foo x ...) = (sequence-foo x ...) and
|
||||
(vectors-foo x ...) = (vector-foo x ...)
|
||||
if the arg.list is admissible for both procedures.
|
||||
[ SEQUENCES-procedures don't support optional [start:end)
|
||||
parameters; SEQUENCE-procedures don't support an arbitrary number
|
||||
of sequence arguments. Same for vectors. ]
|
||||
|
||||
* if all sequence arguments to a general sequence procedure are
|
||||
vectors the result is that of the corresponding vector procedure.
|
||||
E.g. ``sequence-map = vector-map'' on vectors.
|
||||
|
||||
* if all sequence arguments to a general sequence procedure are lists
|
||||
(strings) and there is a corresponding list (string) procedure in
|
||||
the respective srfi, the result complies with the srfi spec.
|
||||
E.g. ``sequences-fold = fold'' on lists,
|
||||
``sequence-fold = string-fold'' on strings.
|
||||
|
||||
|
||||
* Predicates
|
||||
|
||||
|
|
Loading…
Reference in New Issue