ocaml: phase 6 Option/Result/Bytes extensions (+9 tests, 439 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 29s

Option: join, to_result, some, none.
Result: value, iter, fold.
Bytes: length, get, of_string, to_string, concat, sub — thin alias of
String (SX has no separate immutable byte type).

Ordering fix: Bytes module placed after String so its closures capture
String in scope. Earlier draft put Bytes before String which made
String.* lookups fail with 'not a record/module' (treated as nullary
ctor).
This commit is contained in:
2026-05-08 17:19:16 +00:00
parent f05d405bac
commit 4909ebe2ad
3 changed files with 75 additions and 0 deletions

View File

@@ -399,6 +399,12 @@ _Newest first._
recognise `!` as the prefix-deref of an application argument, so
`String.concat "" (List.rev !b)` parses as `(... (deref b))`. Buffer
uses a ref holding a string list; contents reverses and concats.
- 2026-05-08 Phase 6 — Option/Result/Bytes extensions (+9 tests, 439
total). Option: join, to_result, some, none. Result: value, iter,
fold. Bytes: length, get, of_string, to_string, concat, sub (thin
alias of String — SX has no separate immutable byte type). Ordering
fix: Bytes module placed after String so its closures capture String
in scope.
- 2026-05-08 Phase 6 — `Stack` and `Queue` modules in OCaml (+5 tests,
430 total). Stack: ref-holding-list LIFO with push/pop/top/length/
is_empty/clear. Queue: amortised O(1) two-list `(front, back)` queue