|
|
dfd89d998e
|
ocaml: phase 5.1 trie.ml baseline (prefix tree, 6/9 word lookups match)
Test, Build, and Deploy / test-build-deploy (push) Failing after 22s
Mutable-record trie with linked-list children:
type trie = {
mutable terminal : bool;
mutable children : (char * trie) list
}
Insert {cat, car, card, cart, dog, doge}; lookup 9 words. Hits are
exactly the inserted set: cat, car, card, cart, dog, doge = 6.
Misses: ca (prefix not terminal), dogs (extends 'dog' but no 'dogs'
node), x (no path).
Tests:
- recursive type definition with self-referential field
- mutable record fields with .field <- v
- Option pattern matching (Some / None)
- tuple-cons pattern (k, v) :: rest
146 baseline programs total.
|
2026-05-10 05:11:12 +00:00 |
|