robb / Asterism

Asterism is yet another functional toolbelt for Objective-C. It tries to be typesafe and simple.
http://robb.github.io/Asterism/
MIT License
226 stars 12 forks source link

Shouldn't ASTAll and ASTAny should return YES for empty containers? #53

Open mixtly87 opened 6 years ago

mixtly87 commented 6 years ago

I find it odd that All and Any methods return NO for empty sets. Formally, I believe, YES should be returned in such cases; according to: https://en.wikipedia.org/wiki/Vacuous_truth#Vacuous_truths_in_mathematics

Additionally, I find I often need to cover an empty-container case manually in my code, because Asterism doesn't return YES in those cases.

robb commented 6 years ago

Very good point, would you be interested in submitting a Pull Request?