Why should (every? string? []) yield true?

后端 未结 6 1484
说谎
说谎 2021-01-11 13:44

Looking at the source code for every? makes clear why

(every? string? []) => true

This is because every?

6条回答
  •  無奈伤痛
    2021-01-11 14:47

    My answer is vacuous truth.
    Wiki covers it well so I'll simply quote the current first paragraph:

    In mathematics and logic, a vacuous truth is a statement that asserts that all members of the empty set have a certain property. For example, the statement "all cell phones in the room are turned off" will be true whenever there are no cell phones in the room. In this case, the statement "all cell phones in the room are turned on" would also be vacuously true, as would the conjunction of the two: "all cell phones in the room are turned on and turned off".

提交回复
热议问题