Sorry, I meant to put a tuple as the return type. Yes, no map.

On Monday, August 29, 2016 at 8:22:25 AM UTC-4, Allen Madsen wrote:
>
> One small amendment, in the successful case, I think `fetch_in` should 
> return a tuple instead of a map. 
> Allen Madsen 
> http://www.allenmadsen.com 
>
>
> On Mon, Aug 29, 2016 at 8:19 AM, Allen Madsen <allen.c...@gmail.com 
> <javascript:>> wrote: 
> > +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 <br...@dockyard.com 
> <javascript:>> wrote: 
> >> 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, [:foo, :qux]) 
> >> :error = fetch_in(map, [:bar]) 
> >> ``` 
> >> 
> >> If this is OK I can implement it. 
> >> 
> >> -- 
> >> 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-co...@googlegroups.com <javascript:>. 
> >> To view this discussion on the web visit 
> >> 
> https://groups.google.com/d/msgid/elixir-lang-core/7daf519b-6122-4aeb-a8bd-7115625f28a9%40googlegroups.com.
>  
>
> >> 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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/10bb9e8f-65ba-422a-b765-ea8e861b9ee0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to