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.
13 lines
238 B
JSON
13 lines
238 B
JSON
{
|
|
"closures.ml": 315,
|
|
"exception_handle.ml": 4,
|
|
"expr_eval.ml": 16,
|
|
"factorial.ml": 3628800,
|
|
"list_ops.ml": 30,
|
|
"module_use.ml": 3,
|
|
"option_match.ml": 5,
|
|
"quicksort.ml": 44,
|
|
"sum_squares.ml": 385,
|
|
"word_count.ml": 3
|
|
}
|