| 1 | const std = @import("std"); |
| 2 | const extras = @import("./lib.zig"); |
| 3 | |
| 4 | pub fn compareFnBasic(N: type) fn (N, N) std.math.Order { |
| 5 | const S = struct { |
| 6 | pub fn compare(a: N, b: N) std.math.Order { |
| 7 | if (a < b) return .lt; |
| 8 | if (a > b) return .gt; |
| 9 | return .eq; |
| 10 | } |
| 11 | }; |
| 12 | return S.compare; |
| 13 | } |