<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">On Mon, Mar 25, 2019 at 6:03 PM Florent Gallaire <<a href="mailto:fgallaire@gmail.com">fgallaire@gmail.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For reasons of taste, I prefer Erlang over Elixir, and my "in list"<br>
operator need comes obviously from my important Python experience.<br>
<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thinking out loud, I think it might be beneficial to look at two additions:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">lists:member - because length(..) is in the set of Valid GuardSeqs and is O(n)</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">maps:is_key</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">maps:get</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The latter map variants are arguably even stronger since they have good lookup time, even for very large maps. Writing maps:is_key(X, #{ a => true, b => true }) should be fast and since it is a literal, it can be optimized in a number of ways by the compiler.</div><br></div></div></div>