[
https://issues.apache.org/jira/browse/GROOVY-10891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17653435#comment-17653435
]
ASF GitHub Bot commented on GROOVY-10891:
-----------------------------------------
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`.
> We should have variants of findResult/s with no Closure which use
> Closure.IDENTITY in that case
> -----------------------------------------------------------------------------------------------
>
> Key: GROOVY-10891
> URL: https://issues.apache.org/jira/browse/GROOVY-10891
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)