Closed devpolant closed 4 years ago
Hi @AntonPoltoratskyi!
I think it's a good idea, however it would be better to have even more generic approach:
func nodeBy(predicate: (Node) -> Bool) -> Node?
func nodesBy(predicate: (Node) -> Bool) -> [Node]
Could you please update your PR so I can merge your work?
Sure, I will push updates today or tomorrow
Hi @ystrot ! I pushed updates
Awesome, thank you! Merged it.
Intention
Updates
func nodeBy(tag:)
is left, but addedfunc nodeBy(predicate:)
which is more customisable (see 'Intention' paragraph).