lspitzner / pqueue

Haskell priority queue package
Other
15 stars 13 forks source link

mapU vs. mapMonotonic #122

Closed treeowl closed 8 months ago

treeowl commented 1 year ago

Data.PQueue.Min exposes a mapU function which is completely undocumented, and does not expose the more aptly named mapMonotonic. I believe we should expose mapMonotonic, and eventually deprecate mapU. mapU is not an "unordered" operation, as its name suggests; rather, it's a somewhat unsafe one.

konsumlamm commented 1 year ago

Agreed. Data.PQueue.Max also exposes a mapU, which is documented, but no mapMonotonic either. This seems like a mistake.