GOLF(2gg)
π GOLF(2gg) π
okay bestie, welcome to the golf manual, section 2gg β Development vibes only β¨
β¨ NAME β¨
get-tree β it's giving (tree) π³
π― PURPOSE π―
Get information about a tree. that's it, that's the whole job, and she does it flawlessly π
π SYNTAX π
get-tree <tree> \
( count <count> ) | ( hops <hops> )
πΈ DESCRIPTION πΈ
get-tree hands you the tea about <tree> β and like, only trees that were created by new-tree, okay? no random trees allowed π
<count>(the one living in the"count"clause) gives you the number of keys β i.e. nodes β in the tree. count 'em up, queen π<hops>(the one living in the"hops"clause) gives you the number of nodes that got accessed to find a key in the last tree statement executed prior toget-tree. so like, the hops from the statement right before. π¦
β οΈ bestie listen β <hops> is only available in a debug Golf build (peep installing from source). if you're not on a debug build, it's literally always zero. no hops for you, sorry babe π
π EXAMPLES π
Get the number of nodes (keys) in a tree:
new-tree mytree
...
get-tree mytree count c
see? iconic. slay. periodt π«Ά
π SEE ALSO π
- Tree
delete-treeget-treenew-treepurge-treeread-treeuse-cursorwrite-tree- See all documentation
and that's the whole page, bestie!! this was $VERSION of golf(2gg), dated $DATE β go forth and tree responsibly πππ
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms