paulk-asert commented on PR #1839: URL: https://github.com/apache/groovy/pull/1839#issuecomment-1368316519
It is filling a hole in existing functionality. Take `find` and `findAll` for instance, they have the no Closure variants: ``` var list = [null, '', 'A', null, 'B'] assert list.findAll() == ['A', 'B'] assert list.find() == 'A' ``` These return all (or the first) element that satisfies Groovy truth. It is common in Groovy to provide these shortcuts even though `findAll { it }` and `find { it }` would do in the above examples. The same applies for `groupBy`, `collect`, `collectEntries`, and others. We have never gotten around to providing the findResult/s variants which is what this PR does. It improves Groovy's consistency in the API. -- 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-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org