[ 
https://issues.apache.org/jira/browse/GROOVY-7488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14614918#comment-14614918
 ] 

Paul King commented on GROOVY-7488:
-----------------------------------

Sure, I haven't seen a definition of inorder for a non-binary tree that I can 
make sense of but we could provide:
{code}
depthFirst(boolean preorder, Closure operation)
breadthFirst(boolean preorder, Closure operation)
{code}
And the code for those methods could check for one and two parameter closures.
We just have three spots we'd need to fix (XmlParser, XmlSlurper, DOMCategory) 
to keep consistency between the APIs.

> Depth 1st and Breath 1st taking a closure
> -----------------------------------------
>
>                 Key: GROOVY-7488
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7488
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-jdk
>            Reporter: Suminda Dharmasena
>            Priority: Minor
>
> E.g.
> n.depthFirst { level, node -> ... }
> NB: there is level



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to