The earliest function as proposed by Jose above is more like the sort_by function than the min function. It returns a sorted list.
On Friday, October 11, 2019 at 2:40:47 PM UTC+8, Fernando Tapia Rico wrote: > > I would drop the `mapper` function, and have a similar interface to > `Enum.min/2`: `DateTime.earliest(list_of_dates, empty_fallback // fn -> > raise(...) end)`. -- 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/25379734-c54c-45ba-ad04-b3d0ca873104%40googlegroups.com.