Check

Module that can be used to test whether or not a BTree is valid

public func check<K, V>(t : Types.BTree<K, V>, compare : (K, K) -> O.Order) : Bool

Checks a BTree for validity, checking for both key ordering and node height/depth equivalence

type CheckDepthResult = {#ok : Nat; #err}

public func checkTreeDepthIsValid<K, V>(t : Types.BTree<K, V>) : CheckDepthResult

type CheckOrderResult = {#ok; #err}

public func checkDataOrderIsValid<K, V>(t : Types.BTree<K, V>, compare : (K, K) -> O.Order) : CheckOrderResult

Ensures the ordering of all elements in the BTree is valid