diff options
Diffstat (limited to 'stdlib/source/library/lux/data/text/unicode/set.lux')
-rw-r--r-- | stdlib/source/library/lux/data/text/unicode/set.lux | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/stdlib/source/library/lux/data/text/unicode/set.lux b/stdlib/source/library/lux/data/text/unicode/set.lux index b6b1e06b2..89359273b 100644 --- a/stdlib/source/library/lux/data/text/unicode/set.lux +++ b/stdlib/source/library/lux/data/text/unicode/set.lux @@ -1,51 +1,51 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}]] - [data - [collection - ["[0]" list ("[1]#[0]" mix functor)] - ["[0]" set ("[1]#[0]" equivalence)] - ["[0]" tree "_" - ["[1]" finger {"+" Tree}]]]] - [type {"+" :by_example} - abstract]]] - ["[0]" / "_" - ["/[1]" // "_" - [// {"+" Char}] - ["[1][0]" block {"+" Block}]]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}]] + [data + [collection + ["[0]" list ("[1]#[0]" mix functor)] + ["[0]" set ("[1]#[0]" equivalence)] + ["[0]" tree "_" + ["[1]" finger {"+" Tree}]]]] + [type {"+" by_example} + [abstract {"-" pattern}]]]] + ["[0]" / "_" + ["/[1]" // "_" + [// {"+" Char}] + ["[1][0]" block {"+" Block}]]]) (def: builder (tree.builder //block.monoid)) (def: :@: - (:by_example [@] - (tree.Builder @ Block) - ..builder - - @)) + (by_example [@] + (tree.Builder @ Block) + ..builder + + @)) (abstract: .public Set (Tree :@: Block []) (def: .public (composite left right) (-> Set Set Set) - (:abstraction + (abstraction (# builder branch - (:representation left) - (:representation right)))) + (representation left) + (representation right)))) (def: (singleton block) (-> Block Set) - (:abstraction + (abstraction (# builder leaf block []))) (def: .public (set [head tail]) (-> [Block (List Block)] Set) - (list#mix (: (-> Block Set Set) - (function (_ block set) - (..composite (..singleton block) set))) + (list#mix (is (-> Block Set Set) + (function (_ block set) + (..composite (..singleton block) set))) (..singleton head) tail)) @@ -202,19 +202,19 @@ (def: .public start (-> Set Char) - (|>> :representation + (|>> representation tree.tag //block.start)) (def: .public end (-> Set Char) - (|>> :representation + (|>> representation tree.tag //block.end)) (def: .public (member? set character) (-> Set Char Bit) - (loop [tree (:representation set)] + (loop [tree (representation set)] (if (//block.within? (tree.tag tree) character) (case (tree.root tree) {0 #0 _} @@ -229,8 +229,8 @@ (Equivalence Set) (def: (= reference subject) - (set#= (set.of_list //block.hash (tree.tags (:representation reference))) - (set.of_list //block.hash (tree.tags (:representation subject)))))) + (set#= (set.of_list //block.hash (tree.tags (representation reference))) + (set.of_list //block.hash (tree.tags (representation subject)))))) ) (template [<name> <blocks>] |