Range selection based on binary search

Select range of items in a list. Indexes of the sub list range are computed
with a binary search.