Reverse the order of keys in a tree
JavaScript function underlying the tree:reverse builtin, with the same parameters and effects.
tree:reverse