Say I want to write a sort function for an array of a generic type, how would I constrain that generic type to something that can be ordered?
In Rust that would be
fn sort<T: Ord>(array: &mut [T]) {}
How do I achieve this in Zig without using anytype and leaving it to duck typing? Would like some method that can be applied to more than just this example