The use-case is totally fair. I would not consider it an edge-case. +1 for adding the `on_empty: boolean` option
On Thu, 21 Jan 2021 10:00:02 -0300 Randson <orand...@gmail.com> wrote: > Yeah, I agree with you guys. The words are synonyms and I think we > can add an option to all?/2, where default for breaking changes is > false and if you really need that empty lists should return false. If > specify it on an third argument. > > I could prepare a PR this week implementing that. > > What do you guys think? > > > On 21 Jan 2021, at 09:57, Jon Rowe <m...@jonrowe.co.uk> wrote: > > > > I think this is too confusing compared to `all?`, the words are > > synonyms but I agree that having `all?` return `true` for an empty > > list can create extra cruft unless you create your own wrapper > > functions, personally I wouldn’t mind an option to configure it > > with a default to true, such as `Enum.all?(enum, fnx, on_empty: > > false)` > > > > Regards > > Jon > > ---------------- > > m...@jonrowe.co.uk > > https://jonrowe.co.uk > > > > On 21 January 2021 at 12:51, Felipe Stival wrote: > >> Personally, I don't like having both `every?` and `all?`, I think > >> it would be ambiguous. And I think the use-case does not justify > >> this ambiguity. > > > > -- > > 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 > > <mailto:elixir-lang-core+unsubscr...@googlegroups.com>. To view > > this discussion on the web visit > > https://groups.google.com/d/msgid/elixir-lang-core/dejalu-217-153a6b1d-c305-4299-9e78-4e70469e4b0f%40jonrowe.co.uk > > <https://groups.google.com/d/msgid/elixir-lang-core/dejalu-217-153a6b1d-c305-4299-9e78-4e70469e4b0f%40jonrowe.co.uk?utm_medium=email&utm_source=footer>. > -- 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/60097c84.1c69fb81.69bda.27a7SMTPIN_ADDED_MISSING%40gmr-mx.google.com.