Prioqueue v0.2.7 Prioqueue.Helper View Source

Link to this section Summary

Functions

Performs comparison of elements based on Erlang's built-in term ordering.

Compares two items but returns the inverse result, meaning that if a is smaller than b, :gt will be returned.

Link to this section Functions

Performs comparison of elements based on Erlang's built-in term ordering.

Link to this function

cmp_inverse(a, b, cmp_fun \\ &cmp/2) View Source

Compares two items but returns the inverse result, meaning that if a is smaller than b, :gt will be returned.

This is useful to transform a Priority Queue (which by default functions as a minimum queue) to a maximum queue.