These functions return what they should. It's standard mathematical logic. Enum.all? is a universal quantifier, asking if all members of a collection satisfy such condition. That is false if there is at least one member which does not satisfy the condition, otherwise it is true. In particular, it is true on an empty collection. "All elements of an empty set are prime" is a true statement in mathematics.
Enum.every? should be an alias to all?, they are similar concepts, should behave the same as a predicate. You really need your own function "collection is not empty and all?". -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM%3DYcdgv%2BQUV4oQUj5i6weGbv5it5%3DX4wKGRsF-gzzL8jusp9A%40mail.gmail.com.