aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map_dict.gleam10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map_dict.gleam b/src/map_dict.gleam
index e702f89..3c49aa5 100644
--- a/src/map_dict.gleam
+++ b/src/map_dict.gleam
@@ -3,10 +3,6 @@ import result
// TODO: update :: fn(MapDict(k, v), k, fn(Result(v, NotFound)) -> v) -> MapDict(k, v)
// TODO: delete :: fn(MapDict(k, v), k) -> MapDict(k, v)
-// TODO: is_disjoint
-// TODO: is_subset
-// TODO: difference
-// TODO: intersection
pub external type MapDict(key, value);
@@ -77,3 +73,9 @@ pub fn drop(map, keys) {
}
pub external fn merge(MapDict(k, v), MapDict(k, v)) -> MapDict(k, v) = "maps" "merge"
+
+external fn erl_delete(k, MapDict(k, v)) -> MapDict(k, v) = "maps" "remove"
+
+pub fn delete(map, key) {
+ erl_delete(key, map)
+}