ocaml: phase 6 List.combine/split/iter2/fold_left2/map2 (+4, 367 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 30s

Mechanical pair-walk OCaml implementations. failwith on length
mismatch matches Stdlib semantics. List module now covers 30+
functions.
This commit is contained in:
2026-05-08 13:48:48 +00:00
parent dac9cf124f
commit 16df48ff74
3 changed files with 63 additions and 1 deletions

View File

@@ -250,7 +250,8 @@ SX CEK evaluator (both JS and OCaml hosts)
`append`, `iter`, `for_all`, `exists`, `mem`, `nth`, `hd`, `tl`,
`rev_append`, `concat`/`flatten`, `init`, `iteri`, `mapi`, `find`,
`find_opt`, `assoc`, `assoc_opt`, `partition`, `sort`,
`stable_sort` (insertion sort, O(n²)). _(Pending: combine, split.)_
`stable_sort`, `combine`, `split`, `iter2`, `fold_left2`, `map2`.
30+ functions covered.
- [~] `Option`: `map`, `bind`, `value`, `get`, `is_none`, `is_some`,
`iter`, `fold`, `to_list`. _(Pending: join/to_result.)_
- [~] `Result`: `map`, `bind`, `is_ok`, `is_error`, `get_ok`,
@@ -372,6 +373,10 @@ the "mother tongue" closure: OCaml → SX → OCaml. This means:
_Newest first._
- 2026-05-08 Phase 6 — List.combine/split/iter2/fold_left2/map2 (+4
tests, 367 total). Mechanical pair-walk OCaml implementations,
failwith on length-mismatch matching Stdlib semantics. List module
now covers 30+ functions.
- 2026-05-08 Phase 5.1 — baseline expanded to 8 programs (8/8 pass).
Added: closures.ml (curried adders), quicksort.ml (recursive sort
on lists), exception_handle.ml (exception decl + raise + try/with).