Looking at the source code for every?
makes clear why
(every? string? []) => true
This is because every?
It is defined so in mathemathics an there is a good reason for that. It would be a consistency disaster if every?
was defined any other way.
With current definition the result of concatenation satisfies every? foo
if and only if all concatenated collections also satisfy every? foo
. Making every?
return false
on empty lists would break this convenient equivalence and a host of others (e.g. removal of an element would sometimes lead to switching every?
from true
to false
.)