Re: [elixir-core:8467] [Proposal] Add invert() method to Map module

2019-02-06 Thread Amos King - Binary Noggin
I find that small piece of code would often have other data processing connected to it. I'd hate to cycle through the map multiple times if I was going to swap the key and value, and then do more processing on the value. I think such a function would encourage the practice of chaining along

[elixir-core:8467] [Proposal] Add invert() method to Map module

2019-02-05 Thread Justin Gamble
Hi, I think an invert() method on Map would be convenient to use. It is only a handful of lines of code to add to a custom program, but why should users need to do that? In my opinion this basic functionality should be implemented by the Map module. The invert() method would operate the