get-tree provides information about <tree> (created by new-tree):
<count> (in "count" clause) provides the number of keys (i.e. nodes) in the tree.
<hops> (in "hops" clause) provides the number of nodes accessed to find a key in the last tree statement executed prior to get-tree. Note that <hops> is available only in debug Golf build (see installing from source); otherwise it is always zero.
Examples
Get the number of nodes (keys) in a tree:
new-tree mytree
...
get-tree mytree count c
Copied!
Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.