Re: [elixir-core:6258] [proposal] Kernel.fetch_in

2016-08-29 Thread Allen Madsen
+1 from me. Seems consistent with `get_in` and `put_in` and follows the semantics of `fetch`. Allen Madsen http://www.allenmadsen.com On Mon, Aug 29, 2016 at 7:11 AM, Brian Cardarella wrote: > When using `with` there are several times I wish I could have reached deeper >

[elixir-core:6258] [proposal] Kernel.fetch_in

2016-08-29 Thread Brian Cardarella
When using `with` there are several times I wish I could have reached deeper into a Map or Keyword list in a single line rather than multiple fetch statements. Ideally it would work like this: ``` map = %{foo: %{bar: "baz"}} %{:ok, "bar"} = fetch_in(map, [:foo, :bar]) :error = fetch_in(map,