groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Dorner <felix.dor...@gmail.com>
Subject Re: Aw: Do closures always return a value?
Date Fri, 04 Dec 2015 11:14:27 GMT


> while (iterator.hasNext()){
>      Object next = it.next()
>      doSomethingWith(next)
>      if (!childrenAreInteresting(next)){
>      it.prune() // this skips the subtree of the current element
>      }
> }
This should be iterator.prune()

Mime
View raw message