[erlang-questions] lists:all/2 unexpected result for the empty list

Jachym Holecek freza@REDACTED
Wed Jul 20 00:43:24 CEST 2011


# James Aimonetti 2011-07-19:
> Was wondering the reasoning for lists:all/2 returning true when passed
> an empty list as the second parameter?

See http://en.wikipedia.org/wiki/Universal_quantification#The_empty_set.

Intuitively: If universal quantifier evaluates to false that would mean
there was at least one element violating the predicate, right? Now how
could that possibly happen in a set with no elements at all?

BR,
	-- Jachym



More information about the erlang-questions mailing list