<div dir="ltr">Looks good, for completeness can you add a test where it returns false too. <div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 1:20 PM, Richard Carlsson <span dir="ltr"><<a href="mailto:carlsson.richard@gmail.com" target="_blank">carlsson.richard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Perhaps I should mention my attempt at a complete unified dict-API, that I tried to rouse some interest in about a couple of years ago. (This change would be compatible with my suggestions.)<br>
<br>
See<br>
<br>
<a href="http://erlang.org/pipermail/erlang-questions/2011-December/063430.html" target="_blank">http://erlang.org/pipermail/<u></u>erlang-questions/2011-<u></u>December/063430.html</a><br>
<br>
and<br>
<br>
<a href="https://github.com/richcarl/otp/tree/dict-api" target="_blank">https://github.com/richcarl/<u></u>otp/tree/dict-api</a><span class="HOEnZb"><font color="#888888"><br>
<br>
/Richard</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 2013-09-06 13:05 , Robert Virding wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I just want to comment that I think this is a reasonable and useful externsion of the dict/orddict API.<br>
<br>
Robert<br>
<br>
----- Original Message -----<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: "Fredrik" <<a href="mailto:fredrik@erlang.org" target="_blank">fredrik@erlang.org</a>><br>
To: "Magnus Henoch" <<a href="mailto:magnus@erlang-solutions.com" target="_blank">magnus@erlang-solutions.com</a>><br>
Cc: <a href="mailto:erlang-patches@erlang.org" target="_blank">erlang-patches@erlang.org</a><br>
Sent: Wednesday, 4 September, 2013 4:22:14 PM<br>
Subject: Re: [erlang-patches] Add dict:is_empty/1 and orddict:is_empty/1<br>
<br>
On 09/04/2013 04:13 PM, Magnus Henoch wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This patch adds the functions dict:is_empty/1 and orddict:is_empty/1.<br>
For dict, comparing the size against 0 runs in constant time, but not<br>
for orddict. My new functions are an attempt to relieve users from<br>
having to know such implementation details.<br>
<br>
git fetch git://<a href="http://github.com/legoscia/otp.git" target="_blank">github.com/legoscia/otp.<u></u>git</a> dict_orddict_is_empty<br>
<br>
<a href="https://github.com/legoscia/otp/compare/erlang:master...legoscia:dict_orddict_is_empty" target="_blank">https://github.com/legoscia/<u></u>otp/compare/erlang:master...<u></u>legoscia:dict_orddict_is_empty</a><br>
<a href="https://github.com/legoscia/otp/compare/erlang:master...legoscia:dict_orddict_is_empty.patch" target="_blank">https://github.com/legoscia/<u></u>otp/compare/erlang:master...<u></u>legoscia:dict_orddict_is_<u></u>empty.patch</a><br>
<br>
Regards,<br>
Magnus<br>
______________________________<u></u>_________________<br>
erlang-patches mailing list<br>
<a href="mailto:erlang-patches@erlang.org" target="_blank">erlang-patches@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-patches" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-patches</a><br>
</blockquote>
Hello Magnus,<br>
I've fetched your patch and assigned it to be reviewed by responsible<br>
developers.<br>
Thanks,<br>
<br>
--<br>
<br>
BR Fredrik Gustafsson<br>
Erlang OTP Team<br>
<br>
______________________________<u></u>_________________<br>
erlang-patches mailing list<br>
<a href="mailto:erlang-patches@erlang.org" target="_blank">erlang-patches@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-patches" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-patches</a><br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
erlang-patches mailing list<br>
<a href="mailto:erlang-patches@erlang.org" target="_blank">erlang-patches@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-patches" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-patches</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
erlang-patches mailing list<br>
<a href="mailto:erlang-patches@erlang.org" target="_blank">erlang-patches@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-patches" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-patches</a><br>
</div></div></blockquote></div><br></div>