Hi Matt, of those functions, which one is your use case about? Is it union
exclusively?

And would the proposed behaviour of Range.union/2 of returning nil for
non-overlapping ranges be desired? You would most likely lose that in those
cases (or have to resort to a set anyway).



*José Valimwww.plataformatec.com.br
<http://www.plataformatec.com.br/>Founder and Director of R&D*

On Thu, Sep 28, 2017 at 6:20 AM, Matt Jonas <[email protected]> wrote:

> Here's a use case...
>
> I have several "catalog" entries, each with a min & max. I'd like to
> determine the union of these entries. Converting them to Ranges and then
> getting the union of those would be an intuitive way.
>
> While it's possible to use a MapSet, it feels wasteful as you have to load
> it up with every number in the range.
>
> --
> 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/430283dc-f5bf-442b-9132-
> 0f9a14a7564a%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/430283dc-f5bf-442b-9132-0f9a14a7564a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAGnRm4%2BeQL%2BBJcFiRoEK3m8jqReCy%3DaBsnRTCJ6uHzX7UVfCGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to