So I was hoping for a learning experience, and I got it. With a little playing around, looking at phobos, and TDPL, I think I've figured out how lowerBound gets its predicate. It learns it from assumeSorted. So I can do this:

order.assumeSorted!((a, b) => number[a] < number[b])
     .lowerBound(order[4])

and I'll retrieve the indices of the 4 smallest numbers. Not useful for my current purposes, but is getting me closer to figuring out how higher level functions and ranges work.

Thanks

Andrew

Reply via email to