aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/collection/dictionary
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/collection/dictionary')
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/ordered.lux10
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/plist.lux12
2 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
index 6d343f573..d4516f8d1 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
@@ -250,7 +250,7 @@
#Black
<default_behavior>))))
-(def: .public (put key value dict)
+(def: .public (has key value dict)
(All [k v] (-> k v (Dictionary k v) (Dictionary k v)))
(let [(^open "_\.") (get@ #&order dict)
root' (loop [?root (get@ #root dict)]
@@ -473,7 +473,7 @@
_
(undefined)))
-(def: .public (remove key dict)
+(def: .public (lacks key dict)
(All [k v] (-> k (Dictionary k v) (Dictionary k v)))
(let [(^open "_\.") (get@ #&order dict)
[?root found?] (loop [?root (get@ #root dict)]
@@ -528,11 +528,11 @@
(set@ #root (#.Some (blackened root)) dict)
)))
-(def: .public (update key transform dict)
+(def: .public (revised key transform dict)
(All [k v] (-> k (-> v v) (Dictionary k v) (Dictionary k v)))
(case (..get key dict)
(#.Some old)
- (..put key (transform old) dict)
+ (..has key (transform old) dict)
#.None
dict))
@@ -540,7 +540,7 @@
(def: .public (of_list order list)
(All [k v] (-> (Order k) (List [k v]) (Dictionary k v)))
(list\fold (function (_ [key value] dict)
- (put key value dict))
+ (has key value dict))
(empty order)
list))
diff --git a/stdlib/source/library/lux/data/collection/dictionary/plist.lux b/stdlib/source/library/lux/data/collection/dictionary/plist.lux
index a251109f4..88ea21f79 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/plist.lux
@@ -59,7 +59,7 @@
#.None
false))
-(def: .public (put key val properties)
+(def: .public (has key val properties)
(All [a] (-> Text a (PList a) (PList a)))
(case properties
#.End
@@ -70,9 +70,9 @@
(#.Item [key val]
properties')
(#.Item [k' v']
- (put key val properties')))))
+ (has key val properties')))))
-(def: .public (update key f properties)
+(def: .public (revised key f properties)
(All [a] (-> Text (-> a a) (PList a) (PList a)))
(case properties
#.End
@@ -81,9 +81,9 @@
(#.Item [k' v'] properties')
(if (text\= key k')
(#.Item [k' (f v')] properties')
- (#.Item [k' v'] (update key f properties')))))
+ (#.Item [k' v'] (revised key f properties')))))
-(def: .public (remove key properties)
+(def: .public (lacks key properties)
(All [a] (-> Text (PList a) (PList a)))
(case properties
#.End
@@ -93,7 +93,7 @@
(if (text\= key k')
properties'
(#.Item [k' v']
- (remove key properties')))))
+ (lacks key properties')))))
(def: .public equivalence
(All [a] (-> (Equivalence a) (Equivalence (PList a))))