From 0e4b0ae7ce57117a561f70fa51026d85b4702aaa Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Wed, 4 Sep 2013 14:08:34 +0100 Subject: Add dict:is_empty/1 and orddict:is_empty/1 dict:size/1 runs in constant time, but orddict:size/1 does not. With this change, the two modules stay API compatible and gain a constant-time function for checking whether a dictionary is empty. --- lib/stdlib/doc/src/dict.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/stdlib/doc/src/dict.xml') diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml index b8cf61af80..6ff81b56ee 100644 --- a/lib/stdlib/doc/src/dict.xml +++ b/lib/stdlib/doc/src/dict.xml @@ -176,6 +176,13 @@ merge(Fun, D1, D2) ->

Returns the number of elements in a Dict.

+ + + Return true if the dictionary is empty + +

Returns true if Dict has no elements, false otherwise.

+
+
Store a value in a dictionary -- cgit v1.2.3