giles
2c7a1bfc47
Test, Build, and Deploy / test-build-deploy (push) Failing after 25s
ocaml: phase 5.1 permutations_gen.ml baseline (24 perms, 12 with a<b ends)
...
Recursive permutation generator via fold-pick-recurse:
let rec permutations xs = match xs with
| [] -> [[]]
| _ ->
List.fold_left (fun acc x ->
let rest = List.filter (fun y -> y <> x) xs in
let subs = permutations rest in
acc @ List.map (fun p -> x :: p) subs
) [] xs
For permutations of [1; 2; 3; 4] (24 total), count those whose
first element is less than the last:
match p with
| [a; _; _; b] when a < b -> count := !count + 1
| _ -> ()
By symmetry, exactly half satisfy a < b = 12.
Tests List.filter, recursive fold with append, fixed-length
list pattern [a; _; _; b] with multiple wildcards + when guard.
183 baseline programs total.
2026-05-11 02:34:58 +00:00
..
2026-05-10 00:36:29 +00:00
2026-05-09 08:50:12 +00:00
2026-05-09 19:18:01 +00:00
2026-05-09 12:14:32 +00:00
2026-05-09 19:47:21 +00:00
2026-05-09 12:34:36 +00:00
2026-05-09 12:52:55 +00:00
2026-05-09 12:24:48 +00:00
2026-05-10 21:37:41 +00:00
2026-05-09 11:19:23 +00:00
2026-05-10 06:43:46 +00:00
2026-05-10 23:08:16 +00:00
2026-05-09 13:02:17 +00:00
2026-05-09 09:15:00 +00:00
2026-05-10 02:26:10 +00:00
2026-05-11 01:02:59 +00:00
2026-05-11 01:22:31 +00:00
2026-05-09 10:40:49 +00:00
2026-05-09 21:06:10 +00:00
2026-05-09 10:21:11 +00:00
2026-05-10 22:07:17 +00:00
2026-05-11 00:09:06 +00:00
2026-05-09 16:28:15 +00:00
2026-05-10 05:01:08 +00:00
2026-05-10 04:20:47 +00:00
2026-05-11 01:12:33 +00:00
2026-05-11 01:53:21 +00:00
2026-05-10 22:58:13 +00:00
2026-05-09 19:56:58 +00:00
2026-05-09 20:05:45 +00:00
2026-05-09 22:21:16 +00:00
2026-05-09 21:59:23 +00:00
2026-05-09 21:35:59 +00:00
2026-05-09 20:16:49 +00:00
2026-05-09 22:11:11 +00:00
2026-05-09 20:36:43 +00:00
2026-05-09 21:46:16 +00:00
2026-05-09 22:53:27 +00:00
2026-05-09 22:43:45 +00:00
2026-05-09 23:27:15 +00:00
2026-05-09 22:31:27 +00:00
2026-05-09 23:03:06 +00:00
2026-05-09 23:37:36 +00:00
2026-05-09 23:17:00 +00:00
2026-05-09 23:50:25 +00:00
2026-05-10 00:26:46 +00:00
2026-05-10 00:09:57 +00:00
2026-05-09 12:04:42 +00:00
2026-05-11 02:34:58 +00:00
2026-05-09 11:09:23 +00:00
2026-05-10 23:48:46 +00:00
2026-05-09 17:36:24 +00:00
2026-05-09 15:53:47 +00:00
2026-05-09 20:56:31 +00:00
2026-05-09 11:52:19 +00:00
2026-05-10 21:57:42 +00:00
2026-05-10 05:41:02 +00:00
2026-05-09 11:42:52 +00:00
2026-05-09 19:08:19 +00:00
2026-05-09 09:34:40 +00:00
2026-05-09 17:45:52 +00:00
2026-05-09 14:40:22 +00:00
2026-05-09 13:30:46 +00:00
2026-05-09 18:27:50 +00:00
2026-05-09 08:21:19 +00:00
2026-05-10 02:46:20 +00:00
2026-05-09 15:02:13 +00:00
2026-05-11 01:42:26 +00:00
2026-05-10 06:21:06 +00:00
2026-05-09 17:55:07 +00:00
2026-05-09 21:16:40 +00:00
2026-05-11 02:04:08 +00:00
2026-05-10 03:22:29 +00:00
2026-05-09 10:07:12 +00:00
2026-05-10 04:08:53 +00:00
2026-05-10 04:38:59 +00:00
2026-05-10 04:29:58 +00:00
2026-05-10 06:53:38 +00:00
2026-05-10 03:41:19 +00:00
2026-05-11 01:32:41 +00:00
2026-05-11 00:31:08 +00:00
2026-05-09 15:42:01 +00:00
2026-05-10 23:28:29 +00:00
2026-05-09 19:27:14 +00:00
2026-05-10 06:11:57 +00:00
2026-05-09 11:00:00 +00:00
2026-05-10 23:18:26 +00:00
2026-05-09 15:22:28 +00:00
2026-05-09 20:46:42 +00:00
2026-05-09 18:58:32 +00:00
2026-05-09 18:39:46 +00:00
2026-05-09 17:24:53 +00:00
2026-05-10 22:37:44 +00:00
2026-05-09 15:11:46 +00:00
2026-05-09 19:37:11 +00:00
2026-05-09 14:52:13 +00:00
2026-05-10 05:21:14 +00:00
2026-05-09 08:29:01 +00:00
2026-05-10 23:58:50 +00:00
2026-05-10 21:47:52 +00:00
2026-05-10 01:39:25 +00:00
2026-05-11 02:14:44 +00:00
2026-05-10 01:29:52 +00:00
2026-05-09 10:31:22 +00:00
2026-05-09 16:03:22 +00:00
2026-05-09 16:13:05 +00:00
2026-05-10 03:13:36 +00:00
2026-05-09 21:26:31 +00:00
2026-05-09 09:57:18 +00:00
2026-05-09 16:38:09 +00:00
2026-05-10 01:02:18 +00:00
2026-05-11 02:34:58 +00:00
2026-05-10 22:47:22 +00:00
2026-05-09 17:15:47 +00:00
2026-05-11 00:42:08 +00:00
2026-05-09 14:21:24 +00:00
2026-05-09 09:24:41 +00:00
2026-05-09 12:44:02 +00:00
2026-05-10 03:02:17 +00:00
2026-05-10 03:50:59 +00:00
2026-05-10 22:17:40 +00:00
2026-05-11 02:25:04 +00:00
2026-05-10 02:36:37 +00:00
2026-05-10 06:34:13 +00:00
2026-05-09 08:39:56 +00:00
2026-05-09 16:47:56 +00:00
2026-05-09 09:47:25 +00:00
2026-05-10 23:38:40 +00:00
2026-05-09 18:09:33 +00:00
2026-05-09 16:56:46 +00:00
2026-05-09 18:49:00 +00:00
2026-05-09 13:46:40 +00:00
2026-05-10 02:05:09 +00:00
2026-05-10 07:06:29 +00:00
2026-05-09 14:00:49 +00:00
2026-05-10 22:27:18 +00:00
2026-05-10 04:51:15 +00:00
2026-05-09 17:06:10 +00:00
2026-05-10 01:17:11 +00:00
2026-05-09 15:32:11 +00:00
2026-05-10 05:11:12 +00:00
2026-05-09 13:15:05 +00:00
2026-05-10 03:59:56 +00:00
2026-05-11 00:52:42 +00:00
2026-05-09 18:19:02 +00:00
2026-05-10 01:49:23 +00:00
2026-05-09 14:30:55 +00:00
2026-05-09 11:33:30 +00:00