ocaml: phase 5.1 word_count.ml baseline (10/10 pass)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 29s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 29s
Uses Map.Make(StrOrd) + List.fold_left to count word frequencies;
exercises the full functor pipeline with a real-world idiom:
let inc_count m word =
match StrMap.find_opt word m with
| None -> StrMap.add word 1 m
| Some n -> StrMap.add word (n + 1) m
let count words = List.fold_left inc_count StrMap.empty words
10/10 baseline programs pass.
This commit is contained in:
@@ -386,6 +386,9 @@ the "mother tongue" closure: OCaml → SX → OCaml. This means:
|
||||
|
||||
_Newest first._
|
||||
|
||||
- 2026-05-08 Phase 5.1 — word_count.ml baseline (10/10 pass). Uses
|
||||
Map.Make(StrOrd) + List.fold_left to count word frequencies; tests
|
||||
the full functor pipeline with a real OCaml idiom.
|
||||
- 2026-05-08 Phase 6 — Map/Set extensions: iter/fold/map/filter/
|
||||
is_empty + Set.union/inter (+4 tests, 422 total). Functor
|
||||
bodies grow naturally — all in OCaml syntax.
|
||||
|
||||
Reference in New Issue
Block a user