List and Aggregate Procedures

Lists, pairs, vectors, and bytevectors have explicit proper-list, index, identity, and mutation boundaries.

At a glance

LISPEX
(list (list-ref (list 10 20 30) 1) (vector-ref #(4 5) 0))

Result

OUTPUT
(20 4)

Current guarantees

  • List access/search includes the c...r family, list-ref, list-tail, member/assoc variants, copy, append, reverse, and constructors.
  • Vector construction, access, copy, map, and vector-set! are available; bytevectors are read-only in this profile.
  • Bad pair/list domains are E310; bad indices/ranges are E311; wrong primitive types are E312.

Aggregate signatures

SignatureResult / identityFault
(cons a d)fresh pairnone
(car pair) / (cdr pair)stored componentE310 non-pair
(list-ref proper-list k)k-th elementE312 non-integer; E311 range; E310 improper spine
(vector-ref vector k) / (vector-set! vector k value)element / zero values; vector identity retainedE312 type; E311 range
(bytevector-u8-ref bytevector k)exact integer 0..255E312 type; E311 range

Boundaries

  • Pair and bytevector mutators are deferred; quoted aggregates cannot be mutated.