diff options
Diffstat (limited to 'stdlib/source/library/lux/data/collection/set.lux')
-rw-r--r-- | stdlib/source/library/lux/data/collection/set.lux | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/library/lux/data/collection/set.lux b/stdlib/source/library/lux/data/collection/set.lux index f3ccdc7fb..bd18afe96 100644 --- a/stdlib/source/library/lux/data/collection/set.lux +++ b/stdlib/source/library/lux/data/collection/set.lux @@ -32,13 +32,13 @@ (All [a] (-> (Set a) Nat)) //.size) -(def: .public (add elem set) +(def: .public (has elem set) (All [a] (-> a (Set a) (Set a))) - (|> set (//.put elem []))) + (|> set (//.has elem []))) -(def: .public remove +(def: .public lacks (All [a] (-> a (Set a) (Set a))) - //.remove) + //.lacks) (def: .public member? (All [a] (-> (Set a) a Bit)) @@ -54,7 +54,7 @@ (def: .public (difference sub base) (All [a] (-> (Set a) (Set a) (Set a))) - (list\fold ..remove base (..list sub))) + (list\fold ..lacks base (..list sub))) (def: .public (intersection filter base) (All [a] (-> (Set a) (Set a) (Set a))) @@ -92,7 +92,7 @@ (def: .public (of_list hash elements) (All [a] (-> (Hash a) (List a) (Set a))) - (list\fold ..add (..empty hash) elements)) + (list\fold ..has (..empty hash) elements)) (def: .public (sub? super sub) (All [a] (-> (Set a) (Set a) Bit)) |