dswitzer
08/24/2023, 8:53 PM...given closure/function with every element...
It actually should say something like:
This function calls a given closure/function and returns true if any of the values cause the closure call to return true. The logic is short-circuited, so the first truthy match will stop processing more elements. If all elements fail the closure call, then false is returned.
Not sure that that's the best wording, but the docs should definitely clarify that the logic is short-circuited, because the way it's written now it states every element is tested.Adam Cameron
some function.Adam Cameron
every are - likewise - missing the point.
https://docs.lucee.org/reference/objects/array/every.htmlAdam Cameron
zackster
08/25/2023, 9:37 AMdswitzer
08/25/2023, 11:08 AMdswitzer
08/25/2023, 11:09 AMdswitzer
08/25/2023, 11:09 AMThis function calls a given closure/function and returns true if any of the values in a given array cause the closure call to return true. The logic is short-circuited, so the first truthy match will stop processing more items. If all items fail the closure call, then false is returned.