Good catch. It should operate on Calendar.date, as all other functions in
the Date module.

Btw, the reason I prefer earliest/latest is exactly because it has semantic
meaning. It also avoids any confusion from people thinking the regular
min/max work with calendar types (as you said).

On Thu, Oct 10, 2019 at 11:27 José Valim <jose.va...@plataformatec.com.br>
wrote:

>
> To be clear the functionality would be:
>>
>> DateTime.earliest(enumerable, mapper \\ fn x -> x end)
>>
>> with a typespec like
>>
>> @spec earliest(Enum.t(), (any() -> t())) :: list()
>>
>> right?
>>
>
> Correct.
> --
>
>
> *José Valim*
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Director of R&D
>
-- 


*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

-- 
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/CAGnRm4%2B_grScXn%3Dhe9-45OBfw9vCfoJ_LnnZENNiDsWsigP9Fw%40mail.gmail.com.

Reply via email to