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

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


Vocabulary
interval-maps

Inputs
keyan object
mapan interval-map


Outputs
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