Re: [elixir-core:8458] Adding `take!` and `drop!` to Map and Keyword modules

2019-01-20 Thread José Valim
Those are not equivalent though, as one is passing a map and the other a keyword list. You could call Map.new but it is unlikely you have a map made only of external arguments... so I am thinking you can't really escape from buiilding the map by hand. *José Valim* www.plataformatec.com.br Skype:

Re: [elixir-core:8458] Adding `take!` and `drop!` to Map and Keyword modules

2019-01-20 Thread Valter Sundström
Sorry I messed up the title forgetting to add `[proposal]`, but since you answered here, let's go with this thread. The GenServer case I am talking about is essentially this: def start_link(opts) do state = %{ foo: Keyword.fetch!(opts, :foo), bar: Keyword.fetch!(opts, :bar)