aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/collection/sequence.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/collection/sequence.lux')
-rw-r--r--stdlib/source/library/lux/data/collection/sequence.lux21
1 files changed, 11 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux
index 4c935a3d4..8e9340a6f 100644
--- a/stdlib/source/library/lux/data/collection/sequence.lux
+++ b/stdlib/source/library/lux/data/collection/sequence.lux
@@ -27,6 +27,7 @@
["[1]" \\unsafe {"+" Array}]]]]
[macro
[syntax {"+" syntax:}]
+ ["^" pattern]
["[0]" code]]
[math
[number
@@ -140,8 +141,8 @@
(|> (array.clone hierarchy)
(array.has! sub_idx {#Hierarchy (hierarchy#has (level_down level) idx val sub_node)}))
- (^multi {#Base base}
- (n.= 0 (level_down level)))
+ (^.multi {#Base base}
+ (n.= 0 (level_down level)))
(|> (array.clone hierarchy)
(array.has! sub_idx (|> (array.clone base)
(array.has! (branch_idx idx) val)
@@ -385,7 +386,7 @@
(def: (= v1 v2)
(and (n.= (the #size v1) (the #size v2))
- (let [(^open "node#[0]") (node_equivalence //#=)]
+ (let [(open "node#[0]") (node_equivalence //#=)]
(and (node#= {#Base (the #tail v1)}
{#Base (the #tail v2)})
(node#= {#Hierarchy (the #root v1)}
@@ -410,7 +411,7 @@
(Mix Sequence)
(def: (mix $ init xs)
- (let [(^open "[0]") node_mix]
+ (let [(open "[0]") node_mix]
(mix $
(mix $
init
@@ -453,9 +454,9 @@
(def: &functor ..functor)
(def: (on fa ff)
- (let [(^open "[0]") ..functor
- (^open "[0]") ..mix
- (^open "[0]") ..monoid
+ (let [(open "[0]") ..functor
+ (open "[0]") ..mix
+ (open "[0]") ..monoid
results (each (function (_ f) (each f fa))
ff)]
(mix composite identity results))))
@@ -469,8 +470,8 @@
(|>> sequence))
(def: conjoint
- (let [(^open "[0]") ..mix
- (^open "[0]") ..monoid]
+ (let [(open "[0]") ..mix
+ (open "[0]") ..monoid]
(mix (function (_ post pre) (composite pre post)) identity))))
(def: .public reversed
@@ -493,7 +494,7 @@
{#Hierarchy hierarchy}
(<array> (help predicate) hierarchy))))]
(function (<name> predicate sequence)
- (let [(^open "_[0]") sequence]
+ (let [(open "_[0]") sequence]
(<op> (help predicate {#Hierarchy _#root})
(help predicate {#Base _#tail}))))))]