Add has_key/2 dictionary method.
[hope.git] / src / hope_gen_dictionary.erl
index 0d45ecd..ea0f551 100644 (file)
 -callback get(t(K, V), K) ->
     hope_option:t(V).
 
+-callback get(t(K, V), K, V) ->
+    V.
+
+-callback get(t(K, V), K, V, fun((V) -> boolean())) ->
+    V.
+
 -callback set(t(K, V), K, V) ->
     t(K, V).
 
@@ -42,3 +48,6 @@
 
 -callback to_kv_list(t(K, V)) ->
     [{K, V}].
+
+-callback has_key(t(K, _), K) ->
+    boolean().
This page took 0.031223 seconds and 4 git commands to generate.