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

James Aimonetti james@REDACTED
Wed Jul 20 01:28:31 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bingo, winner. Thanks Jachym. Maths ftw!

On 07/19/2011 03:43 PM, Jachym Holecek wrote:
> # 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
> 


- -- 
James Aimonetti
Distributed Systems Engineer / DJ MC_

2600hz | http://2600hz.com
sip:james@REDACTED
tel: 415.886.7905
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOJhMfAAoJENc77s1OYoGgDBIH/3fu9Io4ZT0CLRd2pShhUxVL
VWAazvSuF5WYGKsRKuCXWiSOB34RKHvZqGT1gCqXHnVpS+tiwrDQDbtjVYQozXxK
F9AGej0T65qsOTRf6qkNy1eheztRF4ZYOl94l0LhNUkQ1MMWtneXk7CVpk8cUyPl
1O9KVYt71DX/kAMNl60OeQ7XSXKifngRA7GS1ZfyvjiT06FyDrs/vPrSyDrA0ZT3
t9bMwrTSRj0vCKR+QpekVAXy2dt0LZLsuYq0MxS+VYGPsyeAlCTMiWuVxw83l8p9
74lMcOB9gIh50yymYk6ifuBXt8cs78BUYNfmkEpID29+9QZAwrNgyYPas25cuOg=
=uC+s
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list