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

后端 未结 6 1499
说谎
说谎 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:35

    Or better ask why should (every? string? []) yield false? Both variants lead to wrong answer in certain requirements. But obviously it's better than get an error on empty sequence.

提交回复
热议问题