> On Jul 12, 2019, at 13:43, José Valim <[email protected]> wrote: > > Filtering nils may be considered bad practice (i.e. why do you have nils > there?)
I use them, on occasion, to support a "maybe" type. > ... it may be more readable to do with Enum.reject(&is_nil/1). Cool! I just replaced four instances of `Enum.filter(&(&1))` with `Enum.reject(&is_nil/1)`. FWIW, I'd love to see an annotated collection of suggested Elixir idioms such as this one. -r -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/C4BDFC3F-1646-4957-B814-0204D3B147A6%40gmail.com. For more options, visit https://groups.google.com/d/optout.
