[Haskell-cafe] Data.Foldable.all and empty list
kane at kane.cx
Tue Sep 29 21:37:19 UTC 2015
'all' tests whether the predicate is true for all elements; if there are no elements, it's vacuously true (cf. forall quantifier in logic).
On 9/29/2015 11:33 PM, Lana Black wrote:
> Is there any particular reason why the 'all' function returns True when
> supplied with an empty list (or any other foldable)? I'm aware that it
> is implemented via All monoid instance, my question is whether this
> behaviour is intentional or it can be considered a bug.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4291 bytes
Desc: S/MIME Cryptographic Signature
More information about the Haskell-Cafe