Finds all items partially equal (not necessarily literally equal) to val. In a generic slice in ascending or descending order. Returns the Range of the matching items. When the range is empty (n..n), then n is the sort order of where the missing val could be inserted.
Assigns a comparator closure `pcomp` just once, depending on whether the order is ascending or descending.
1 comment
[ 2.3 ms ] story [ 10.3 ms ] threadFinds all items partially equal (not necessarily literally equal) to val. In a generic slice in ascending or descending order. Returns the Range of the matching items. When the range is empty (n..n), then n is the sort order of where the missing val could be inserted.
Assigns a comparator closure `pcomp` just once, depending on whether the order is ascending or descending.