• Pops the minimum item then adds a new item. It is efficient than calling popMin and insert manually.

    Type Parameters

    • T

    Parameters

    • item: T

      To insert.

    Returns (<S>(heap) => Mut<S, Option<T>>)

    The removed item, or none if empty.

Generated using TypeDoc