3 ms·
Why try to reduce assertions made against something that doesn't exist down to a boolean result? Clearly the answer is undefinable
by Minor49er 3y ago
Why try to reduce assertions made against something that doesn't exist down to a boolean result? Clearly the answer is undefinable
- neuromanser 3y agoThe assertion is against the set (list in the TFA).
- rwmj 3y agoIt makes recursion easier. For example: ∀(head::tail) = head ∩ ∀(tail) if ∀([]) is defined as true then this works for the single element list.
- IshKebab 3y agoIt's easily definable. all(x) is true iff none of the elements in x are false. This is really the only sane option. To do anything else would be a weird special case for []. Like defining len([]) == None. There's no point; it just makes everything more complicated and worse.