Acute
1 program
Added 2026-03-11T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit e8f139c7d3 · authored 2026-03-11T18:53:06+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Mergesort
Provenance: commit e8f139c7d3 · authored 2026-03-11T18:53:06+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
(* Acute: Mergesort implementation *)
let rec merge xs ys =
match xs, ys with
| [], ys -> ys
| xs, [] -> xs
| x :: xs', y :: ys' ->
if x <= y then x :: merge xs' ys
else y :: merge xs ys'
let rec split = function
| [] -> ([], [])
| [x] -> ([x], [])
| x :: y :: rest ->
let (xs, ys) = split rest in
(x :: xs, y :: ys)
let rec mergesort = function
| [] -> []
| [x] -> [x]
| xs ->
let (left, right) = split xs in
merge (mergesort left) (mergesort right)
let () =
let lst = [5; 3; 8; 1; 9; 2; 7; 4; 6] in
let sorted = mergesort lst in
List.iter (fun x -> Printf.printf "%d " x) sorted;
print_newline ()