interval-at* ( key map -- value ? )
Factor handbook > The language > Collections > Interval maps

Next:interval-at ( key map -- value )


Vocabulary
interval-maps

Inputs and outputs
keyan object
mapan interval-map
valuethe value for the key, or f
?whether the key is present


Word description
Looks up a key in an interval map, returning the corresponding value if the item is in an interval in the map, and a boolean flag. The operation takes O(log n) time.

Definition