jaspervdj / psqueues

Priority Search Queues in three different flavors for Haskell
https://hackage.haskell.org/package/psqueues
Other
64 stars 24 forks source link

Does atMostView return an ordered list or not? #57

Open mitchellwrosen opened 4 months ago

mitchellwrosen commented 4 months ago

Hi, I think the documentation of atMostView is self-contradictory (emphasis mine):

Return a list of elements ordered by key whose priorities are at most pt, and the rest of the queue stripped of these elements. The returned list of elements can be in any order: no guarantees there.

Perhaps the docs just need to be adjusted?

Thanks!

jaspervdj commented 4 months ago

Good catch! I think the original intent of the second sentence is to stress that they are not ordered by priority in any sense. Would you be willing to add a PR to reword this?