Re: The feature to find the value inside the nested map.
Christophe De Troyer <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, What you are describing can be done with "lenses". They're a functional construct to get/update data from nested data structures. While googling I found an older discussion on this mailiing list http://erlang.org/pipermail/erlang-questions/2015-September/086068.html. Hope that helps. - Christophe On 16 June 2021 04:04:38 CEST, "瀬川昂弘" <[email protected]> wrote: >Assuming, >Map = #{a => b,c => #{1 => 2,3 => 4,5 => #{x => y}}}. > >Expected: >maps:new_find_fun(Key = 5, Map) = {ok,#{x => y}}. > >It's useful there is the above feature, in my guess. > >-- >Takahiro Segawa. >E-mail:[email protected] -- Sent from my Android device with K-9 Mail. Please excuse my brevity.