jaspervdj / psqueues

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

fromList behavior does not match documentation #47

Closed treeowl closed 1 year ago

treeowl commented 1 year ago

fromList is documented as retaining the last priority and value. But it actually retains the first one. To retain the last one (as documented), the foldr should be changed to foldl'. To retain the first one (as is currently done), the foldr should also be changed to a foldl', but with a different version of insert.

treeowl commented 1 year ago

So do we want to change the behavior to match the documentation, or the documentation to match the behavior?

treeowl commented 1 year ago

Ugh. Ticket description updated; it was scrambled.

treeowl commented 1 year ago

@jaspervdj , this awaits your ruling....