@@ -3,7 +3,7 @@
4Set operations
4Set operations
6−Core whose [arm]()s contain a variety of functions that operate on [`++set`]()s. Its [sample]() accepts the input [`++set`]() to be manipulated.
6+Core whose arms contain a variety of functions that operate on `++set`s. Its sample accepts the input `++set` to be manipulated.
@@ -15,7 +15,7 @@ Source
16 ++ in :: set engine
16 ++ in :: set engine
18− |/ a=(set)
18+ |_ a/(set)
@@ -33,9 +33,9 @@ producing a boolean.
36−`a` is a [`++set`]().
36+`a` is a `++set`.
38−`b` is a [wet]() [gate]() that accepts a [noun]() and produces a boolean.
38+`b` is a wet gate that accepts a noun and produces a boolean.
@@ -47,21 +47,21 @@ Source
48 +- all :: logical AND
48 +- all :: logical AND
50− |* b=$+(* ?)
50+ |* b/$-(* ?)
54 ?&((b n.a) $(a l.a) $(a r.a))
54 ?&((b n.a) $(a l.a) $(a r.a))
60− ~zod/try=> =b (sa `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
60+ ~zod/try=> =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
61− ~zod/try=> (~(all in b) |=(a=* ?@(+.a & |)))
61+ ~zod/try=> (~(all in b) |=(a/* ?@(+.a & |)))
63− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
63+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
64− ~zod/try=> (~(all in b) |=(a=@t (gte a 100)))
64+ ~zod/try=> (~(all in b) |=(a/@t (gte a 100)))
67------------------------------------------------------------------------
67------------------------------------------------------------------------
@@ -75,9 +75,9 @@ Computes the logical OR on every element of `a` slammed with `b`.
78−`a` is a [`++set`]().
78+`a` is a `++set`.
80−`b` is a [gate]() that accepts a noun and produces a boolean.
80+`b` is a gate that accepts a noun and produces a boolean.
@@ -89,21 +89,22 @@ Source
90 +- any :: logical OR
90 +- any :: logical OR
92− |* b=$+(* ?)
92+ |* b/$-(* ?)
96 ?|((b n.a) $(a l.a) $(a r.a))
96 ?|((b n.a) $(a l.a) $(a r.a))
102− ~zod/try=> =b (sa `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
103+ ~zod/try=> =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
103− ~zod/try=> (~(any in b) |=(a=* ?@(+.a & |)))
104+ ~zod/try=> (~(any in b) |=(a/* ?@(+.a & |)))
105− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
106+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
106− ~zod/try=> (~(any in b) |=(a=@t (lte a 100)))
107+ ~zod/try=> (~(any in b) |=(a/@t (lte a 100)))
109------------------------------------------------------------------------
110------------------------------------------------------------------------
@@ -112,14 +113,14 @@ Examples
113Remove noun
114Remove noun
115−Removes `b` from the [`++set`]() `a`.
116+Removes `b` from the `++set` `a`.
120`a` is a set.
121`a` is a set.
122−`b` is a [noun]().
123+`b` is a noun.
@@ -131,7 +132,7 @@ Source
132 +- del :: b without any a
133 +- del :: b without any a
@@ -139,7 +140,7 @@ Source
139 ?: (hor b n.a)
140 ?: (hor b n.a)
140 [n.a $(a l.a) r.a]
141 [n.a $(a l.a) r.a]
141 [n.a l.a $(a r.a)]
142 [n.a l.a $(a r.a)]
142− |- ^- ?(~ _a)
143+ |- ^- {$?($~ _a)}
143 ?~ l.a r.a
144 ?~ l.a r.a
144 ?~ r.a l.a
145 ?~ r.a l.a
145 ?: (vor n.l.a n.r.a)
146 ?: (vor n.l.a n.r.a)
@@ -151,10 +152,10 @@ Source
154− ~zod/try=> =b (sa `(list ,@t)`['a' 'b' 'c' ~])
155+ ~zod/try=> =b (sa `(list @t)`['a' 'b' 'c' ~])
155 ~zod/try=> (~(del in b) 'a')
156 ~zod/try=> (~(del in b) 'a')
156 {'c' 'b'}
157 {'c' 'b'}
157− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
158+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
158 ~zod/try=> (~(del in b) 'john')
159 ~zod/try=> (~(del in b) 'john')
159 {'bonita' 'madeleine' 'daniel'}
160 {'bonita' 'madeleine' 'daniel'}
160 ~zod/try=> (~(del in b) 'susan')
161 ~zod/try=> (~(del in b) 'susan')
@@ -171,34 +172,35 @@ Produce the axis of `b` within `a`.
174−`a` is a [`++set`]().
175+`a` is a `++set`.
176−`b` is a [noun]().
177+`b` is a noun.
181−The [`++unit`]() of an atom.
182+The `++unit` of an atom.
186 +- dig :: axis of a in b
187 +- dig :: axis of a in b
189− |- ^- (unit ,@)
190+ |- ^- (unit @)
191 ?: =(b n.a) [~ u=(peg c 2)]
192 ?: =(b n.a) [~ u=(peg c 2)]
192− ?: (gor b n.a)
193+ ?: (hor b n.a)
193 $(a l.a, c (peg c 6))
194 $(a l.a, c (peg c 6))
194 $(a r.a, c (peg c 7))
195 $(a r.a, c (peg c 7))
201− ~zod/try=> =a (sa `(list ,@)`[1 2 3 4 5 6 7 ~])
203+ ~zod/try=> =a (sa `(list @)`[1 2 3 4 5 6 7 ~])
202 ~zod/try=> a
204 ~zod/try=> a
203 {5 4 7 6 1 3 2}
205 {5 4 7 6 1 3 2}
204 ~zod/try=> -.a
206 ~zod/try=> -.a
@@ -216,7 +218,7 @@ Examples
217Concatenate
219Concatenate
219−Insert the elements of a [`++list`]() `b` into a [`++set`]() `a`.
221+Insert the elements of a `++list` `b` into a `++set` `a`.
@@ -235,11 +237,11 @@ Source
236 +- gas :: concatenate
238 +- gas :: concatenate
238− |= b=(list ,_?>(?=(^ a) n.a))
240+ |= b/(list _?>(?=(^ a) n.a))
242− $(b t.b, a (put(+< a) i.b))
244+ $(b t.b, a (put i.b))
@@ -248,7 +250,7 @@ Examples
249 ~zod/try=> b
251 ~zod/try=> b
250 {'bonita' 'madeleine' 'rudolf' 'john'}
252 {'bonita' 'madeleine' 'rudolf' 'john'}
251− ~zod/try=> (~(gas in b) `(list ,@t)`['14' 'things' 'number' '1.337' ~])
253+ ~zod/try=> (~(gas in b) `(list @t)`['14' 'things' 'number' '1.337' ~])
252 {'1.337' '14' 'number' 'things' 'bonita' 'madeleine' 'rudolf' 'john'}
254 {'1.337' '14' 'number' 'things' 'bonita' 'madeleine' 'rudolf' 'john'}
253 ~zod/try=> (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
255 ~zod/try=> (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
254 {'1' '3' '2' 'e' 'd' 'a' 'c' 'b'}
256 {'1' '3' '2' 'e' 'd' 'a' 'c' 'b'}
@@ -278,7 +280,7 @@ Source
279 +- has :: b exists in a check
281 +- has :: b exists in a check
@@ -293,7 +295,7 @@ Source
296− ~zod/try=> =a (~(gas in `(set ,@t)`~) `(list ,@t)`[`a` `b` `c` ~])
298+ ~zod/try=> =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
297 ~zod/try=> (~(has in a) `a`)
299 ~zod/try=> (~(has in a) `a`)
299 ~zod/try=> (~(has in a) 'z')
301 ~zod/try=> (~(has in a) 'z')
@@ -305,7 +307,7 @@ Examples
306Intersection
308Intersection
308−Produces a set of the intersection between two [`++set`]()s of the same type,
310+Produces a set of the intersection between two `++set`s of the same type,
309`a` and `b`.
311`a` and `b`.
@@ -318,14 +320,14 @@ Accepts
321−A [`++set`]().
323+A `++set`.
326− +- int :: intersection
328+ +- int :: intersection
@@ -336,8 +338,10 @@ Source
336 ?: =(n.b n.a)
338 ?: =(n.b n.a)
337 [n.a $(a l.a, b l.b) $(a r.a, b r.b)]
339 [n.a $(a l.a, b l.b) $(a r.a, b r.b)]
338 ?: (hor n.b n.a)
340 ?: (hor n.b n.a)
339− %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
341+ %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
340− %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
342+ %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
@@ -358,26 +362,26 @@ Examples
359Put b in a
363Put b in a
361−Add an element `b` to the [`++set`]() `a`.
365+Add an element `b` to the `++set` `a`.
366`a` is a set.
370`a` is a set.
368−`b` is a [noun]().
372+`b` is a noun.
373−A [`++set`]().
377+A `++set`.
378− +- put :: puts b in a
382+ +- put :: puts b in a, sorted
@@ -400,7 +404,7 @@ Source
403− ~zod/try=> =a (~(gas in `(set ,@t)`~) `(list ,@t)`[`a` `b` `c` ~])
407+ ~zod/try=> =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
404 ~zod/try=> =b (~(put in a) `d`)
408 ~zod/try=> =b (~(put in a) `d`)
405 ~zod/try=> b
409 ~zod/try=> b
406 {`d` `a` `c` `b`}
410 {`d` `a` `c` `b`}
@@ -413,14 +417,14 @@ Examples
414Accumulate
418Accumulate
416−Accumulate the elements of `a` using a [gate]() `c` and an accumulator `b`.
420+Accumulate the elements of `a` using a gate `c` and an accumulator `b`.
421−`a` is a [`++set`]().
425+`a` is a `++set`.
423−`b` is a [noun]().
427+`b` is a noun.
425`c` is a gate.
429`c` is a gate.
@@ -432,21 +436,21 @@ A noun.
435− +- rep :: replace by tile
439+ +- rep :: replace by product
436− |* [b=* c=_,*]
440+ |* b/_|=({* *} +<+)
438− ?~ a b
442+ ?~ a +<+.b
439− $(a r.a, b $(a l.a, b (c n.a b)))
443+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
446− ~zod/try=> =a (~(gas in *(set ,@)) [1 2 3 ~])
450+ ~zod/try=> =a (~(gas in *(set @)) [1 2 3 ~])
447 ~zod/try=> a
451 ~zod/try=> a
449− ~zod/try=> (~(rep in a) 0 |=([a=@ b=@] (add a b)))
453+ ~zod/try=> (~(rep in a) 0 |=([a/@ b/@] (add a b)))
452------------------------------------------------------------------------
456------------------------------------------------------------------------
@@ -455,7 +459,7 @@ Examples
456Set to list
460Set to list
458−Flattens the [`++set`]() `a` into a [`++list`]().
462+Flattens the `++set` `a` into a `++list`.
@@ -470,23 +474,24 @@ A list.
473− +- tap :: list tiles a set
477+ +- tap :: convert to list
475− |= b=(list ,_?>(?=(^ a) n.a))
479+ |= b/(list _?>(?=(^ a) n.a))
479− $(a r.a, b [n.a $(a l.a)])
483+ $(a r.a b [n.a $(a l.a)])
486− ~zod/try=> =s (sa `(list ,@t)`['a' 'b' 'c' 'd' 'e' ~])
491+ ~zod/try=> =s (sa `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
487 ~zod/try=> s
492 ~zod/try=> s
488 {'e' 'd' 'a' 'c' 'b'}
493 {'e' 'd' 'a' 'c' 'b'}
489− ~zod/try=> (~(tap in s) `(list ,@t)`['1' '2' '3' ~])
494+ ~zod/try=> (~(tap in s) `(list @t)`['1' '2' '3' ~])
490 ~['b' 'c' 'a' 'd' 'e' '1' '2' '3']
495 ~['b' 'c' 'a' 'd' 'e' '1' '2' '3']
491 ~zod/try=> b
496 ~zod/try=> b
492 {'bonita' 'madeleine' 'daniel' 'john'}
497 {'bonita' 'madeleine' 'daniel' 'john'}
@@ -519,7 +524,8 @@ Source
520 +- uni :: union
525 +- uni :: union
@@ -536,6 +542,7 @@ Source
536 ?: (hor n.a n.b)
542 ?: (hor n.a n.b)
537 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
543 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
538 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
544 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
@@ -574,6 +581,8 @@ Source
574 +- wyt :: size of set
581 +- wyt :: size of set
576 ?~(a 0 +((add $(a l.a) $(a r.a))))
583 ?~(a 0 +((add $(a l.a) $(a r.a))))