racket / data

Other
16 stars 23 forks source link

Feature request: get all intervals in an interval map that intersect a given one #24

Open bluebear94 opened 3 years ago

bluebear94 commented 3 years ago

Example of what I want:

> (define r (make-interval-map '(((0 . 5) . apple) ((5 . 10) . banana))))
> (interval-map-ref/in r 2 7)
'(((2 . 5) . apple) ((5 . 7) banana))

Unresolved questions:

bluebear94 commented 3 years ago

This is already possible to do using interval-map-update*!, but I don't think this task should require users to use such a function.