| ... | ... | @@ -1129,7 +1129,7 @@ fn swap( |
| 1129 | 1129 | } |
| 1130 | 1130 | } |
| 1131 | 1131 | |
| 1132 | | /// Use to generate a comparator function for a given type. e.g. `sort(u8, slice, asc(u8))`. |
| 1132 | /// Use to generate a comparator function for a given type. e.g. `sort(u8, slice, {}, comptime asc(u8))`. |
| 1133 | 1133 | pub fn asc(comptime T: type) fn (void, T, T) bool { |
| 1134 | 1134 | const impl = struct { |
| 1135 | 1135 | fn inner(context: void, a: T, b: T) bool { |
| ... | ... | @@ -1140,7 +1140,7 @@ pub fn asc(comptime T: type) fn (void, T, T) bool { |
| 1140 | 1140 | return impl.inner; |
| 1141 | 1141 | } |
| 1142 | 1142 | |
| 1143 | | /// Use to generate a comparator function for a given type. e.g. `sort(u8, slice, asc(u8))`. |
| 1143 | /// Use to generate a comparator function for a given type. e.g. `sort(u8, slice, {}, comptime desc(u8))`. |
| 1144 | 1144 | pub fn desc(comptime T: type) fn (void, T, T) bool { |
| 1145 | 1145 | const impl = struct { |
| 1146 | 1146 | fn inner(context: void, a: T, b: T) bool { |