<p>You can look through the ideas described in this paper <a href="http://arxiv.org/abs/1312.4666" rel="nofollow">A Functional Approach to Standard Binary Heaps</a> or in this source <a href="https://github.com/vkostyukov/scalacaster/blob/master/src/heap/Heap.scala" rel="nofollow">Heap.scala</a>.</p>
How can I implement a purely functional standard binary heap (ocaml or haskell)?
<p>Are there any implementations of a purely functional standard binary heap? I know there are lots of interesting heaps eg: Binomial, leftist heap, they all have functional implementation, just wonder is there a way to implement standard binary heap or we have to use Array to implement it, because of the immutable type ? Thanks!</p>