<@U10EJRH2L>: not sure what you mean. This code r...
# announcements
u
@Ruckus: not sure what you mean. This code recycled from stack overflow works perfectly fine
Copy code
class BoundedBinaryHeap<T> protected constructor(val max : Int,
                                                 arrayFactory: (Int) -> Array<T>) {
  companion object {
    inline fun <reified T> invoke(max : Int)
      = BoundedBinaryHeap(max, { size -> arrayOfNulls<T>(max) })
  }
  val nodes = arrayFactory(max)
}