aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data')
-rw-r--r--stdlib/source/library/lux/data/collection/array.lux2
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary.lux28
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/plist.lux6
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux4
-rw-r--r--stdlib/source/library/lux/data/collection/tree/zipper.lux4
5 files changed, 22 insertions, 22 deletions
diff --git a/stdlib/source/library/lux/data/collection/array.lux b/stdlib/source/library/lux/data/collection/array.lux
index 31cfc865b..73cc3e9d0 100644
--- a/stdlib/source/library/lux/data/collection/array.lux
+++ b/stdlib/source/library/lux/data/collection/array.lux
@@ -303,7 +303,7 @@
_
(recur (-- idx)
{#.Item (maybe.else default (read! idx array))
- output}))))
+ output}))))
(def: .public (list default array)
(All (_ a) (-> (Maybe a) (Array a) (List a)))
diff --git a/stdlib/source/library/lux/data/collection/dictionary.lux b/stdlib/source/library/lux/data/collection/dictionary.lux
index bc78d8032..0b9690eb3 100644
--- a/stdlib/source/library/lux/data/collection/dictionary.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary.lux
@@ -60,8 +60,8 @@
(Variant
{#Hierarchy Nat (Array (Node k v))}
{#Base Bit_Map
- (Array (Either (Node k v)
- [k v]))}
+ (Array (Either (Node k v)
+ [k v]))}
{#Collisions Hash_Code (Array [k v])}))
... #Hierarchy nodes are meant to point down only to lower-level nodes.
@@ -309,8 +309,8 @@
_
[(++ _size) empty_node])]
{#Hierarchy _size'
- (array\revised idx (node\has (level_up level) hash key val key_hash sub_node)
- hierarchy)})
+ (array\revised idx (node\has (level_up level) hash key val key_hash sub_node)
+ hierarchy)})
... For #Base nodes, check if the corresponding Bit_Position has
... already been used.
@@ -361,14 +361,14 @@
... If so, resize the #Base node to accommodate the
... new KV-pair.
{#Base (with_bit_position bit bitmap)
- (array\has (base_index bit bitmap) {#.Right [key val]} base)}
+ (array\has (base_index bit bitmap) {#.Right [key val]} base)}
... Otherwise, promote it to a #Hierarchy node, and add the new
... KV-pair as a singleton node to it.
{#Hierarchy (++ base_count)
- (|> base
- (promotion node\has key_hash level bitmap)
- (array.write! (level_index level hash)
- (node\has (level_up level) hash key val key_hash empty_node)))}))))
+ (|> base
+ (promotion node\has key_hash level bitmap)
+ (array.write! (level_index level hash)
+ (node\has (level_up level) hash key val key_hash empty_node)))}))))
... For #Collisions nodes, compare the hashes.
{#Collisions _hash _colls}
@@ -387,8 +387,8 @@
... If the hashes are not equal, create a new #Base node that
... contains the old #Collisions node, plus the new KV-pair.
(|> {#Base (level_bit_position level _hash)
- (|> (array.empty 1)
- (array.write! 0 {#.Left node}))}
+ (|> (array.empty 1)
+ (array.write! 0 {#.Left node}))}
(node\has level hash key val key_hash)))
))
@@ -446,11 +446,11 @@
... But if not, then just unset the position and
... remove the node.
{#Base (without_bit_position bit bitmap)
- (array\lacks idx base)})
+ (array\lacks idx base)})
... But, if it did not come out empty, then the
... position is kept, and the node gets updated.
{#Base bitmap
- (array\revised idx {#.Left sub_node'} base)})))
+ (array\revised idx {#.Left sub_node'} base)})))
... If, however, there was a KV-pair instead of a sub-node.
{#.Some {#.Right [key' val']}}
@@ -458,7 +458,7 @@
(if (\ key_hash = key key')
... If so, remove the KV-pair and unset the Bit_Position.
{#Base (without_bit_position bit bitmap)
- (array\lacks idx base)}
+ (array\lacks idx base)}
... Otherwise, there's nothing to remove.
node)
diff --git a/stdlib/source/library/lux/data/collection/dictionary/plist.lux b/stdlib/source/library/lux/data/collection/dictionary/plist.lux
index 85fec4622..bb7f63265 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/plist.lux
@@ -66,9 +66,9 @@
{#.Item [k' v'] properties'}
(if (text\= key k')
{#.Item [key val]
- properties'}
+ properties'}
{#.Item [k' v']
- (has key val properties')})))
+ (has key val properties')})))
(def: .public (revised key f properties)
(All (_ a) (-> Text (-> a a) (PList a) (PList a)))
@@ -91,7 +91,7 @@
(if (text\= key k')
properties'
{#.Item [k' v']
- (lacks key properties')})))
+ (lacks key properties')})))
(def: .public equivalence
(All (_ a) (-> (Equivalence a) (Equivalence (PList a))))
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index 5c630614b..e2cb06a42 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -468,7 +468,7 @@
(case [(~+ list_vars)]
(~ pattern)
{#.Item [(~+ (each product.left vars+lists))]
- ((~ g!step) (~+ list_vars))}
+ ((~ g!step) (~+ list_vars))}
(~ g!blank)
#.End))))]
@@ -511,7 +511,7 @@
(case [(~+ list_vars)]
(~ pattern)
{#.Item ((~ g!func) (~+ (each product.left vars+lists)))
- ((~ g!step) (~ g!func) (~+ list_vars))}
+ ((~ g!step) (~ g!func) (~+ list_vars))}
(~ g!blank)
#.End))))]
diff --git a/stdlib/source/library/lux/data/collection/tree/zipper.lux b/stdlib/source/library/lux/data/collection/tree/zipper.lux
index 313a61909..60c11d032 100644
--- a/stdlib/source/library/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/library/lux/data/collection/tree/zipper.lux
@@ -108,12 +108,12 @@
(Tree (:parameter 0)))
(with@ #//.children (list\composite (list.reversed lefts)
{#.Item (value@ #node zipper)
- rights})))
+ rights})))
parent)]
(with@ [#node #//.children]
(list\composite (list.reversed lefts)
{#.Item (value@ #node zipper)
- rights})
+ rights})
parent))))))
(template [<one> <all> <side> <op_side>]