aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/collection/set
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/data/collection/set.lux8
-rw-r--r--stdlib/source/lux/data/collection/set/multi.lux14
-rw-r--r--stdlib/source/lux/data/collection/set/ordered.lux6
3 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/lux/data/collection/set.lux b/stdlib/source/lux/data/collection/set.lux
index 7b3e803a3..0a195f4eb 100644
--- a/stdlib/source/lux/data/collection/set.lux
+++ b/stdlib/source/lux/data/collection/set.lux
@@ -7,7 +7,7 @@
[data
[collection
["dict" dictionary (#+ Dictionary)]
- ["." list ("#/." fold)]]]
+ ["." list ("#;." fold)]]]
[type
abstract]])
@@ -46,7 +46,7 @@
(def: #export (difference sub base)
(All [a] (-> (Set a) (Set a) (Set a)))
- (list/fold ..remove base (..to-list sub)))
+ (list;fold ..remove base (..to-list sub)))
(def: #export (intersection filter base)
(All [a] (-> (Set a) (Set a) (Set a)))
@@ -64,7 +64,7 @@
(def: (hash set)
(let [[hash _] (:representation set)]
- (list/fold (function (_ elem acc) (n/+ (:: hash hash elem) acc))
+ (list;fold (function (_ elem acc) (n/+ (:: hash hash elem) acc))
0
(..to-list set)))))
)
@@ -75,7 +75,7 @@
(def: #export (from-list hash elements)
(All [a] (-> (Hash a) (List a) (Set a)))
- (list/fold ..add (..new hash) elements))
+ (list;fold ..add (..new hash) elements))
(def: #export (sub? super sub)
(All [a] (-> (Set a) (Set a) Bit))
diff --git a/stdlib/source/lux/data/collection/set/multi.lux b/stdlib/source/lux/data/collection/set/multi.lux
index e509d41cf..012224e31 100644
--- a/stdlib/source/lux/data/collection/set/multi.lux
+++ b/stdlib/source/lux/data/collection/set/multi.lux
@@ -10,7 +10,7 @@
[////
["." maybe]]
[///
- ["." list ("#/." fold)]
+ ["." list ("#;." fold)]
["." dictionary (#+ Dictionary)]]
["." //])
@@ -25,7 +25,7 @@
(def: #export size
(All [a] (-> (Set a) Nat))
- (|>> :representation dictionary.values (list/fold n/+ 0)))
+ (|>> :representation dictionary.values (list;fold n/+ 0)))
(def: #export (add/* count elem set)
(All [a] (-> Nat a (Set a) (Set a)))
@@ -68,7 +68,7 @@
_ (|> output (#.Cons elem) (append elem (dec count))))))]
(|>> :representation
dictionary.entries
- (list/fold (function (_ [elem count] output)
+ (list;fold (function (_ [elem count] output)
(append elem count output))
#.Nil))))
@@ -81,7 +81,7 @@
(|> parameter
:representation
dictionary.entries
- (list/fold (function (_ [elem count] output)
+ (list;fold (function (_ [elem count] output)
(remove/* count elem output))
subject)))
@@ -90,7 +90,7 @@
(|> parameter
:representation
dictionary.entries
- (list/fold (function (_ [elem count] (^:representation output))
+ (list;fold (function (_ [elem count] (^:representation output))
(:abstraction (if (dictionary.contains? elem output)
(dictionary.update elem (n/min count) output)
output)))
@@ -132,7 +132,7 @@
(def: (hash (^:representation set))
(let [[Hash<a> _] set]
- (list/fold (function (_ [elem count] acc)
+ (list;fold (function (_ [elem count] acc)
(|> elem (:: Hash<a> hash) (n/* count) (n/+ acc)))
0
(dictionary.entries set)))))
@@ -148,7 +148,7 @@
(def: #export (from-list Hash<a> subject)
(All [a] (-> (Hash a) (List a) (Set a)))
- (list/fold ..add/1 (..new Hash<a>) subject))
+ (list;fold ..add/1 (..new Hash<a>) subject))
(def: #export super?
(All [a] (-> (Set a) (Set a) Bit))
diff --git a/stdlib/source/lux/data/collection/set/ordered.lux b/stdlib/source/lux/data/collection/set/ordered.lux
index a3aef2c24..32702ed7f 100644
--- a/stdlib/source/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/lux/data/collection/set/ordered.lux
@@ -5,7 +5,7 @@
[order (#+ Order)]]
[data
[collection
- ["." list ("#/." fold)]
+ ["." list ("#;." fold)]
[dictionary
["/" ordered]]]]
[type
@@ -56,11 +56,11 @@
(def: #export (from-list Order<a> list)
(All [a] (-> (Order a) (List a) (Set a)))
- (list/fold add (new Order<a>) list))
+ (list;fold add (new Order<a>) list))
(def: #export (union left right)
(All [a] (-> (Set a) (Set a) (Set a)))
- (list/fold ..add right (..to-list left)))
+ (list;fold ..add right (..to-list left)))
(def: #export (intersection left right)
(All [a] (-> (Set a) (Set a) (Set a)))