You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2023/01/01 16:46:24 UTC

[GitHub] [groovy] eric-milles commented on pull request #1839: GROOVY-10891: We should have variants of findResult/s with no Closure…

eric-milles commented on PR #1839:
URL: https://github.com/apache/groovy/pull/1839#issuecomment-1368483874

   I don't think it is hole in existing functionality though.  I'm missing the clear and obvious part of all this.  Leaving the default value stuff aside,
   ```groovy
   def list = [null, '', 'A', null, 'B', false, []]
   assert list.find() == 'A'
   assert list.findAll() == ['A', 'B']
   // Is this what you are suggesting?
   assert list.findResult() == 'A'
   assert list.findResults() == ['A', 'B']
   ```
   Why do I need the no-arg variants of `findResult` and `findResults` then?  If not transforming, I justuse `find` or `findAll`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org