Purely functional stable heaps (fair priority queues)