ocaml: phase 5.1 csv.ml baseline (split + int_of_string + fold_left)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Inline CSV-like text:
a,1,extra
b,2,extra
c,3,extra
d,4,extra
Two-stage String.split_on_char: first on '\n' for rows, then on ','
for fields per row. List.fold_left accumulates int_of_string of the
second field across rows. Result = 1+2+3+4 = 10.
Exercises char escapes inside string literals ('\n'), nested
String.split_on_char, List.fold_left with a non-trivial closure body,
and int_of_string. 23 baseline programs total.
This commit is contained in:
@@ -407,6 +407,11 @@ _Newest first._
|
||||
binary search tree (`type 'a tree = Leaf | Node of 'a * 'a tree *
|
||||
'a tree`) with insert + in-order traversal. Tests parametric ADT,
|
||||
recursive match, List.append, List.fold_left.
|
||||
- 2026-05-09 Phase 5.1 — csv.ml baseline (split on '\n' then ',',
|
||||
parse-int the second field, fold-left). Exercises char escapes
|
||||
inside string literals, two-stage String.split_on_char, mixed
|
||||
List.fold_left + int_of_string + List.nth. Sums column 2 of a
|
||||
4-row inline CSV → 1+2+3+4 = 10. 23 baseline programs total.
|
||||
- 2026-05-09 Phase 4 — polymorphic variants confirmation (+3 tests,
|
||||
506 total). The tokenizer was already classifying `` `Tag `` as a
|
||||
ctor identical to a nominal one, but it had never been exercised by
|
||||
|
||||
Reference in New Issue
Block a user