Lisp standard library + brain migration (Closes #155) #164

Merged
robertismo merged 1 commit from 155-stdlib into master 2026-10-02 20:16:59 +00:00
Owner

New builtins: sum, average, min/max (also accept a single list), map, filter, reduce, find, count-if, any?, all?, take, drop, zip, group-by, unique, sort, sort-by (stable), clamp, lerp, log, round.

adapt, empire, and super drop their hand-written list-max/list-min/sum-loans/sum-list/trim and the recursive scan-book walkers (now filter/map one-liners). count-face stays recursive until lambda lands in #157, since it closes over its argument.

Verified behavior-preserving: a full seeded spectate of the migrated brains against the old recursive versions produces byte-identical output. Full suite green, vet clean. Collection types (hash/set/vector/queue) deferred to #159/#160 where they have real use.

New builtins: sum, average, min/max (also accept a single list), map, filter, reduce, find, count-if, any?, all?, take, drop, zip, group-by, unique, sort, sort-by (stable), clamp, lerp, log, round. adapt, empire, and super drop their hand-written list-max/list-min/sum-loans/sum-list/trim and the recursive scan-book walkers (now filter/map one-liners). count-face stays recursive until lambda lands in #157, since it closes over its argument. Verified behavior-preserving: a full seeded spectate of the migrated brains against the old recursive versions produces byte-identical output. Full suite green, vet clean. Collection types (hash/set/vector/queue) deferred to #159/#160 where they have real use.
Lisp standard library + brain migration (Closes #155)
All checks were successful
build / build (push) Successful in 26s
2830b9f0c7
New builtins:
- sum, average, min, max (min/max now also accept a single list)
- map, filter, reduce, find, count-if, any?, all?
- take, drop, zip, group-by, unique
- sort, sort-by (stable, numeric keys)
- clamp, lerp, log, round (pow/exp already existed)

Brains migrated to the stdlib: adapt, empire, and super drop
their hand-written list-max/list-min/sum-loans/sum-list/trim and
the recursive scan-book walkers (now filter/map one-liners). The
count-face helper stays recursive until lambda lands (#157), since
it closes over the face argument.

Behavior-preserving: a full seeded spectate of the migrated brains
against the old recursive versions produces byte-identical output.
Note: the collection types (hash tables, sets, vectors, queues)
from the issue body are deferred — the functions above are what the
brains actually needed; the data structures will arrive with #159
(state) and #160 (combinators) where they have real use.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Winnie/bankwars!164
No description provided.