map, filter, reduce, folds, for-each, vector/string variants, and apply invoke guest procedures through the evaluator application path.
At a glance
LISPEX
(fold-right cons (list) (list 1 2 3))Result
OUTPUT
(1 2 3)Current guarantees
- Traversal order is left to right and callback errors or escapes propagate through the same signal path.
fold-leftis the left-reduction alias;fold-rightcalls(f element accumulator)from the right.for-eachruns for effect and returns the profile unspecified result as zero values.
Callback contracts
| Signature | Traversal / result | Value context |
|---|---|---|
| (map proc list ...) | left-to-right; fresh proper list | callback exactly one value |
| (filter predicate list) | left-to-right; retained elements | predicate exactly one value; only #f rejects |
| (fold-left proc init list) | left accumulator | callback exactly one value |
| (apply proc arg ... final-list) | shared application dispatcher; tail-safe | procedure result packet preserved |
| (for-each proc list ...) | left-to-right effects | callback one value; overall zero values |
Boundaries
- Host callbacks do not bypass guest continuation, handler, or value-context rules.