diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/collection/dictionary.lux | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/lux/data/collection/dictionary.lux b/stdlib/source/lux/data/collection/dictionary.lux index b0f0920fb..21aaecf39 100644 --- a/stdlib/source/lux/data/collection/dictionary.lux +++ b/stdlib/source/lux/data/collection/dictionary.lux @@ -9,8 +9,8 @@ ["." number ["." i64]] [collection - ["." list ("list/." Fold<List> Functor<List> Monoid<List>)] - ["." array (#+ Array) ("array/." Functor<Array> Fold<Array>)]]] + ["." list ("list/." fold functor monoid)] + ["." array (#+ Array) ("array/." functor fold)]]] ]) ## This implementation of Hash Array Mapped Trie (HAMT) is based on @@ -210,7 +210,7 @@ ## Produces the index of a KV-pair within a #Collisions node. (def: (collision-index Hash<k> key colls) (All [k v] (-> (Hash k) k (Collisions k v) (Maybe Index))) - (:: maybe.Monad<Maybe> map product.left + (:: maybe.monad map product.left (array.find+ (function (_ idx [key' val']) (:: Hash<k> = key key')) colls))) @@ -491,7 +491,7 @@ ## For #Collisions nodes, do a linear scan of all the known KV-pairs. (#Collisions _hash _colls) - (:: maybe.Monad<Maybe> map product.right + (:: maybe.monad map product.right (array.find (|>> product.left (:: Hash<k> = key)) _colls)) )) @@ -668,7 +668,7 @@ keys))) ## [Structures] -(structure: #export (Equivalence<Dictionary> Equivalence<v>) (All [k v] (-> (Equivalence v) (Equivalence (Dictionary k v)))) +(structure: #export (equivalence Equivalence<v>) (All [k v] (-> (Equivalence v) (Equivalence (Dictionary k v)))) (def: (= test subject) (and (n/= (size test) (size subject)) |