Boot-layer list plumbing; public list processing lives on the List class.
Boot list layer: %-private walkers only (the top level is sacred, #108); the public list API is the List class.
%as-listBoot-layer plumbing: normalize any iterable to a list (%fold/%map/%filter self-normalize through it). The PUBLIC conversion surface is (List from-seq); this % helper is not provided.
Returns: LIST — The input as a proper list
%foldBoot-layer fold; the public face is (List fold).
Parameters:
CALLABLE — Binary function: (accumulator, element) -> new accumulatorANY — Initial accumulator valueLIST — List or iterable to fold overReturns: ANY — Final accumulated value
%lengthBoot-layer length; the public face is (List length).
Parameters:
LIST — List or iterable%appendBoot-layer append; the public face is (List append).
%reverseBoot-layer reverse; the public face is (List reverse).
Parameters:
LIST — List or iterable%mapBoot-layer map; the public face is (List map).
Parameters:
CALLABLE — Function to applyReturns: LIST — New list
%filterBoot-layer filter; the public face is (List filter).
Parameters:
CALLABLE — Predicate functionLIST — List or iterableReturns: LIST — Filtered list
%memq?Boot-layer eq? membership test.
Boot-layer eq? membership; the public face is (List includes?). Cross-base names need %member-str?.
Parameters:
ANY — Value to look for (eq? comparison)LIST — List to searchReturns: BOOL — True if x occurs in lst under eq?
%member-str?Boot-layer string membership test.
The str=? side of the membership split; convert cross-base symbols to strings and use this.
Parameters:
STR — String to look for (str=? comparison)LIST — List of stringsReturns: BOOL — True if s occurs in lst under str=?
%findBoot-layer find-first matching element.
Boot-layer find-first; the public face is (List find). A nil result conflates a stored nil with a miss – box at the call site when that matters (the %opt-cell pattern).
Parameters:
CALLABLE — PredicateLIST — List to searchReturns: ANY — First element satisfying pred, or nil
%for-eachBoot-layer for-each; the public face is (List for-each).
Parameters:
CALLABLE — Function to apply