The feature to find the value inside the nested map.

Ivan Uemlianin ivan@REDACTED
Wed Jun 16 09:10:33 CEST 2021


Agree.  Haskellers call them lenses.

There was a discussion about them here a few years ago:

http://erlang.org/pipermail/erlang-questions/2015-November/086879.html

And there have been a few implementation attempts:

   2020 https://github.com/slepher/lenses
   2015 https://www.cs.otago.ac.nz/staffpriv/ok/lens.erl
   2012 https://github.com/jlouis/erl-lenses

Best wishes

Ivan


On 16/06/2021 03:04, 瀬川昂弘 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:123430024@REDACTED 
> <mailto:123430024@REDACTED>

-- 
============================================================
Ivan A. Uemlianin PhD
Llaisdy

Ymchwil a Datblygu Technoleg Lleferydd
Speech Technology Research and Development

                     ivan@REDACTED
                         @llaisdy
                          llaisdy.wordpress.com
               github.com/llaisdy
                      www.linkedin.com/in/ivanuemlianin

                         festina lente
============================================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210616/1dece500/attachment.htm>


More information about the erlang-questions mailing list