pub fn sort_by<T, F>(array: &mut [T], compare: F)
where
    T: std::cmp::Ord + std::clone::Clone,
    F: Fn(&T, &T) -> std::cmp::Ordering + std::clone::Clone,
{
    _binary_insertion_sort_impl(array, compare)
}
/// It takes a comparator function to determine the order,
/// and sorts it using a binary insertion sort algorithm.
///
/// ```rust
/// use buldak::binary_insertion;
///
/// let mut nums = [1, 4, 2, 3, 5, 111, 234, 21, 13];
/// binary_insertion::sort_by(&mut nums, |l, r| l.cmp(r));
/// assert_eq!(nums, [1, 2, 3, 4, 5, 13, 21, 111, 234]);
/// ```
It takes a comparator function to determine the order,
and sorts it using a binary insertion sort algorithm.




It takes a comparator function to determine the order and sorts it using a binary insertion sort algorithm .
pub fn sort_by<T, F>(array: &mut [T], compare: F)
where
    T: std::cmp::Ord + std::clone::Clone,
    F: Fn(&T, &T) -> std::cmp::Ordering + std::clone::Clone,
{
    _binary_insertion_sort_impl(array, compare)
}
pub fn sort_by < T , F > ( array : & mut [ T ] , compare : F ) where T : std :: cmp :: Ord + std :: clone :: Clone , F : Fn ( & T , & T ) -> std :: cmp :: Ordering + std :: clone :: Clone , { _binary_insertion_sort_impl ( array , compare ) }
It takes a comparator function to determine the order,
and sorts it using a binary insertion sort algorithm.
It takes a comparator function to determine the order and sorts it using a binary insertion sort algorithm .
array
&mut [T]
compare
F
array
&mut [T]
compare
F