BatOrd.Incubatorval eq_by : ('a -> 'b) -> 'a eqval comp_by : ('a -> 'b) -> 'a compval ord_by : ('a -> 'b) -> 'a ordBuild a eq, cmp or ord function from a projection function. For example, if you wanted to compare integers based on their lowest 4 bits, you could write let cmp_bot4 = cmp_by (fun x
        -> x land 0xf) and use cmp_bot4 as the desired integer comparator.