This package is inspired by SwiftUI.List initlialization using keypath. Similarly, the package provides keypath access for tree operations.
Install package (https://github.com/yosshi4486/TreeAlgorithm) via Xcode swift package manager.
I'm glad if any contribution is made.