<div dir="ltr"><div>I'm afraid I can't see the equivalence in your example - I see a list of tuples as a list of values, whereas a list of maps is a list of containers. In my mind, a more apt comparison would be a list of maps vs a list of lists of tuples, and functions operating on the latter would strike me as an odd addition to stdlib.</div><div><br></div><div>I'd be curious to know what your usecase for these functions is. <br></div><div><br></div><div>Some of them can be trivially implemented:</div><div><br></div><div> keyfind(Key, MapList) -> hd(lists:filter(fun(Map) -> maps:is_key(Key, Map) end, MapList).</div><div><br></div><div>(The example implementation there is inefficient but I hope you get the idea)</div><div><br></div><div>Some others, like keysort(Key, MapList1) -> MapList2 don't quite make sense to me as the semantics are unclear.<br></div><div><br></div><div><br></div><div>I think elaborating on the use cases would help your proposal.</div><div><br></div><div>All the best,</div><div>Karl<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 23 Sep 2019 at 09:00, Vance Shipley <<a href="mailto:vances@motivity.ca">vances@motivity.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Should we have a corollary to lists:keyfind/3 which works on lists of map()?<br>
<br>
keyfind(Key, MapList) -> Map | false<br>
<br>
... and the rest:<br>
<br>
keydelete(Key, MapList1) -> MapList2<br>
keymap(Fun, Key, MapList1) -> MapList2<br>
keymember(Key, MapList) -> boolean()<br>
keymerge(Key, MapList1, MapList2) -> MapList3<br>
keyreplace(Key, MapList1, NewMap) -> MapList2<br>
keysort(Key, MapList1) -> MapList2<br>
keystore(Key, MapList1, NewMap) -> MapList2<br>
keytake(Key, MapList1) -> {value, Map, MapList2} | false<br>
<br>
<br>
--<br>
-Vance<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>