A priority queue implemented in Lua using binary heaps