This is great! I've written a similar helper before to pick a single map 
out of a list of maps that matches a desired {key, val}

On Wednesday, October 4, 2017 at 3:11:53 PM UTC-7, Zach Daniel wrote:
>
> Some utilities that I often wish I had are `Access.filter/1` and 
> `Access.find/1`. Often I find myself doing something like
>
> list_of_results = get_in(some_list, [:path_a, :path_b])
>
> filtered_results = Enum.filter(list_of_results, &some_predicate/1)
>
> get_in(filtered_results, [Access.all(), :a, :b])
>
>
> The PR w/ documentation and information can be found here: 
> https://github.com/elixir-lang/elixir/pull/6634
>
> Let me know what you guys think!
>

-- 
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/73f66a80-8825-4a62-9b1f-cddb55fc1e52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to