Forum Discussion
blep
5 years agoRegular Visitor
Why does List.MatchesAll return true for an empty list?
The function documentation says that List.MatchesAll returns true if the condition function is satisfied by all values in the list, otherwise returns false. Given a value x, I'd expect List.Match...
mahoneypat
5 years agoMicrosoft Employee
I wouldn't have guessed that behavior either, but I suspect it starts to iterate through the list with a TRUE condition, and since the list is empty there are no iterations/evaluations. If you use {null} instead of {} it evaluates as FALSE, as it does do one iteration.
Pat