Joseph Ferano
dad725afe4
The prelude's per-type families collapse: 22 functions become 10, 27 become 16
...
swap!, reverse!, sort!, sort-by!, index-of, min-of, max-of, map!,
reduce and filter, each written once over $t. Every call site in the
corpus moves with them.
min-of and max-of are not min and max because min and max are builtins
over two or more numbers and nothing shadows a builtin. These reduce a
slice, which is a different operation at a different arity.
sort-bytes! did not collapse into sort!, and the reason is the point of
the predicates: a [u8] is not ordered? and cannot be, because < is an
instruction and comparing two slices lexicographically is a loop. It is
sort-by! with bytes<? written in, one line, keeping its name and its
stability note. sum-i32/sum-f32 and append-i64!/append-f64! stay for the
reasons the spike gave.
Not what the notes predicted: none of the ten collapses on a signature
change alone. filter and reduce need copyable? because the checker
demands it - reduce's accumulator at (Vec i32) is a double move - and
the rest declare it because a slice of owning elements would have them
duplicating headers.
2026-09-13 14:49:11 +07:00
..
2026-09-12 11:36:01 +07:00
2026-09-12 21:02:33 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 10:47:41 +07:00
2026-09-12 05:32:25 +07:00
2026-09-13 14:49:11 +07:00
2026-09-12 10:55:18 +07:00
2026-09-12 21:48:08 +07:00
2026-09-13 08:02:22 +07:00
2026-09-12 05:32:25 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 23:18:28 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 23:06:40 +07:00
2026-09-13 08:11:57 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 16:22:58 +07:00
2026-09-12 20:34:32 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 14:47:54 +07:00
2026-09-13 13:07:25 +07:00
2026-09-13 09:27:26 +07:00
2026-09-11 19:39:29 +07:00
2026-09-13 10:35:20 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 11:36:01 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 09:11:34 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 11:07:57 +07:00
2026-09-12 23:18:28 +07:00
2026-09-12 22:44:33 +07:00
2026-09-12 22:44:33 +07:00
2026-09-12 22:44:33 +07:00
2026-09-12 22:44:33 +07:00
2026-09-13 14:49:11 +07:00
2026-09-12 23:06:40 +07:00
2026-09-13 12:44:02 +07:00
2026-09-12 11:15:58 +07:00
2026-09-13 14:49:11 +07:00
2026-09-13 14:49:11 +07:00
2026-09-13 14:49:11 +07:00
2026-09-13 08:07:44 +07:00
2026-09-13 14:49:11 +07:00
2026-09-13 09:32:58 +07:00
2026-09-12 22:00:13 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 20:59:12 +07:00
2026-09-12 20:59:12 +07:00
2026-09-12 23:18:28 +07:00
2026-09-12 20:59:12 +07:00
2026-09-12 23:18:28 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 16:09:27 +07:00
2026-09-12 16:34:25 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 04:46:41 +07:00
2026-09-12 16:46:30 +07:00
2026-09-12 16:46:30 +07:00
2026-09-12 16:46:30 +07:00
2026-09-11 20:11:01 +07:00
2026-09-12 21:02:33 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 10:40:47 +07:00
2026-09-12 05:32:25 +07:00
2026-09-11 20:11:01 +07:00
2026-09-11 20:11:01 +07:00
2026-09-12 05:32:25 +07:00
2026-09-13 07:59:04 +07:00
2026-09-11 07:18:07 +07:00
2026-09-12 23:18:28 +07:00
2026-09-12 23:06:40 +07:00
2026-09-13 07:50:03 +07:00
2026-09-12 23:06:40 +07:00
2026-09-13 07:50:03 +07:00
2026-09-12 16:09:48 +07:00
2026-09-13 14:49:11 +07:00
2026-09-13 09:32:58 +07:00
2026-09-13 09:17:47 +07:00
2026-09-13 14:37:55 +07:00
2026-09-12 05:32:25 +07:00
2026-09-12 05:32:25 +07:00
2026-09-12 05:32:25 +07:00
2026-09-12 10:51:14 +07:00
2026-09-12 05:32:25 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 05:32:25 +07:00
2026-09-12 10:40:47 +07:00
2026-09-12 05:32:25 +07:00
2026-09-13 14:49:11 +07:00
2026-09-12 11:38:24 +07:00
2026-09-12 11:38:24 +07:00
2026-09-12 11:07:57 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 23:06:40 +07:00
2026-09-13 14:49:11 +07:00
2026-09-12 20:27:19 +07:00
2026-09-12 23:18:28 +07:00
2026-09-12 11:15:58 +07:00
2026-09-12 23:06:40 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 11:07:57 +07:00
2026-09-12 11:12:49 +07:00
2026-09-12 11:12:49 +07:00
2026-09-12 11:07:57 +07:00
2026-09-12 11:07:57 +07:00
2026-09-12 11:12:49 +07:00
2026-09-12 11:12:49 +07:00
2026-09-12 11:07:57 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 14:47:54 +07:00
2026-09-12 11:41:24 +07:00