h_in_range function

Check which elements are in a given range