@@ -3,7 +3,7 @@
33
44Set operations
55
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.
77
88Accepts
99-------
@@ -15,7 +15,7 @@ Source
1515
1616 ++ in :: set engine
1717 ~/ %in
18− |/ a=(set)
18+ |_ a/(set)
1919
2020Examples
2121--------
@@ -33,9 +33,9 @@ producing a boolean.
3333Accepts
3434-------
3535
36−`a` is a [`++set`]().
36+`a` is a `++set`.
3737
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.
3939
4040Produces
4141--------
@@ -47,21 +47,21 @@ Source
4747
4848 +- all :: logical AND
4949 ~/ %all
50− |* b=$+(* ?)
50+ |* b/$-(* ?)
5151 |- ^- ?
5252 ?~ a
5353 &
5454 ?&((b n.a) $(a l.a) $(a r.a))
55− ::
55+
5656
5757Examples
5858--------
5959
60− ~zod/try=> =b (sa `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
61− ~zod/try=> (~(all in b) |=(a=* ?@(+.a & |)))
60+ ~zod/try=> =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
61+ ~zod/try=> (~(all in b) |=(a/* ?@(+.a & |)))
6262 %.n
63− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
64− ~zod/try=> (~(all in b) |=(a=@t (gte a 100)))
63+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
64+ ~zod/try=> (~(all in b) |=(a/@t (gte a 100)))
6565 %.y
6666
6767------------------------------------------------------------------------
@@ -75,9 +75,9 @@ Computes the logical OR on every element of `a` slammed with `b`.
7575Accepts
7676-------
7777
78−`a` is a [`++set`]().
78+`a` is a `++set`.
7979
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.
8181
8282Produces
8383--------
@@ -89,21 +89,22 @@ Source
8989
9090 +- any :: logical OR
9191 ~/ %any
92− |* b=$+(* ?)
92+ |* b/$-(* ?)
9393 |- ^- ?
9494 ?~ a
9595 |
9696 ?|((b n.a) $(a l.a) $(a r.a))
9797 ::
9898
99+
99100Examples
100101--------
101102
102− ~zod/try=> =b (sa `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
103− ~zod/try=> (~(any in b) |=(a=* ?@(+.a & |)))
103+ ~zod/try=> =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
104+ ~zod/try=> (~(any in b) |=(a/* ?@(+.a & |)))
104105 %.y
105− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
106− ~zod/try=> (~(any in b) |=(a=@t (lte a 100)))
106+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
107+ ~zod/try=> (~(any in b) |=(a/@t (lte a 100)))
107108 %.n
108109
109110------------------------------------------------------------------------
@@ -112,14 +113,14 @@ Examples
112113
113114Remove noun
114115
115−Removes `b` from the [`++set`]() `a`.
116+Removes `b` from the `++set` `a`.
116117
117118Accepts
118119-------
119120
120121`a` is a set.
121122
122−`b` is a [noun]().
123+`b` is a noun.
123124
124125Produces
125126--------
@@ -131,7 +132,7 @@ Source
131132
132133 +- del :: b without any a
133134 ~/ %del
134− |* b=*
135+ |* b/*
135136 |- ^+ a
136137 ?~ a
137138 ~
@@ -139,7 +140,7 @@ Source
139140 ?: (hor b n.a)
140141 [n.a $(a l.a) r.a]
141142 [n.a l.a $(a r.a)]
142− |- ^- ?(~ _a)
143+ |- ^- {$?($~ _a)}
143144 ?~ l.a r.a
144145 ?~ r.a l.a
145146 ?: (vor n.l.a n.r.a)
@@ -151,10 +152,10 @@ Source
151152Examples
152153--------
153154
154− ~zod/try=> =b (sa `(list ,@t)`['a' 'b' 'c' ~])
155+ ~zod/try=> =b (sa `(list @t)`['a' 'b' 'c' ~])
155156 ~zod/try=> (~(del in b) 'a')
156157 {'c' 'b'}
157− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
158+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
158159 ~zod/try=> (~(del in b) 'john')
159160 {'bonita' 'madeleine' 'daniel'}
160161 ~zod/try=> (~(del in b) 'susan')
@@ -171,34 +172,35 @@ Produce the axis of `b` within `a`.
171172Accepts
172173-------
173174
174−`a` is a [`++set`]().
175+`a` is a `++set`.
175176
176−`b` is a [noun]().
177+`b` is a noun.
177178
178179Produces
179180--------
180181
181−The [`++unit`]() of an atom.
182+The `++unit` of an atom.
182183
183184Source
184185------
185186
186187 +- dig :: axis of a in b
187− |= b=*
188+ |= b/*
188189 =+ c=1
189− |- ^- (unit ,@)
190+ |- ^- (unit @)
190191 ?~ a ~
191192 ?: =(b n.a) [~ u=(peg c 2)]
192− ?: (gor b n.a)
193+ ?: (hor b n.a)
193194 $(a l.a, c (peg c 6))
194195 $(a r.a, c (peg c 7))
195196 ::
196197
197198
199+
198200Examples
199201--------
200202
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 ~])
202204 ~zod/try=> a
203205 {5 4 7 6 1 3 2}
204206 ~zod/try=> -.a
@@ -216,7 +218,7 @@ Examples
216218
217219Concatenate
218220
219−Insert the elements of a [`++list`]() `b` into a [`++set`]() `a`.
221+Insert the elements of a `++list` `b` into a `++set` `a`.
220222
221223Accepts
222224-------
@@ -235,11 +237,11 @@ Source
235237
236238 +- gas :: concatenate
237239 ~/ %gas
238− |= b=(list ,_?>(?=(^ a) n.a))
240+ |= b/(list _?>(?=(^ a) n.a))
239241 |- ^+ a
240242 ?~ b
241243 a
242− $(b t.b, a (put(+< a) i.b))
244+ $(b t.b, a (put i.b))
243245 ::
244246
245247
@@ -248,7 +250,7 @@ Examples
248250
249251 ~zod/try=> b
250252 {'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' ~])
252254 {'1.337' '14' 'number' 'things' 'bonita' 'madeleine' 'rudolf' 'john'}
253255 ~zod/try=> (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
254256 {'1' '3' '2' 'e' 'd' 'a' 'c' 'b'}
@@ -278,7 +280,7 @@ Source
278280
279281 +- has :: b exists in a check
280282 ~/ %has
281− |* b=*
283+ |* b/*
282284 |- ^- ?
283285 ?~ a
284286 |
@@ -293,7 +295,7 @@ Source
293295Examples
294296--------
295297
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` ~])
297299 ~zod/try=> (~(has in a) `a`)
298300 %.y
299301 ~zod/try=> (~(has in a) 'z')
@@ -305,7 +307,7 @@ Examples
305307
306308Intersection
307309
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,
309311`a` and `b`.
310312
311313Accepts
@@ -318,14 +320,14 @@ Accepts
318320Produces
319321--------
320322
321−A [`++set`]().
323+A `++set`.
322324
323325Source
324326------
325327
326− +- int :: intersection
328+ +- int :: intersection
327329 ~/ %int
328− |* b=_a
330+ |* b/_a
329331 |- ^+ a
330332 ?~ b
331333 ~
@@ -336,8 +338,10 @@ Source
336338 ?: =(n.b n.a)
337339 [n.a $(a l.a, b l.b) $(a r.a, b r.b)]
338340 ?: (hor n.b n.a)
339− %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
340− %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
341+ %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
342+ %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
343+ ::
344+
341345
342346
343347Examples
@@ -358,26 +362,26 @@ Examples
358362
359363Put b in a
360364
361−Add an element `b` to the [`++set`]() `a`.
365+Add an element `b` to the `++set` `a`.
362366
363367Accepts
364368-------
365369
366370`a` is a set.
367371
368−`b` is a [noun]().
372+`b` is a noun.
369373
370374Produces
371375--------
372376
373−A [`++set`]().
377+A `++set`.
374378
375379Source
376380------
377381
378− +- put :: puts b in a
382+ +- put :: puts b in a, sorted
379383 ~/ %put
380− |* b=*
384+ |* b/*
381385 |- ^+ a
382386 ?~ a
383387 [b ~ ~]
@@ -400,7 +404,7 @@ Source
400404Examples
401405--------
402406
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` ~])
404408 ~zod/try=> =b (~(put in a) `d`)
405409 ~zod/try=> b
406410 {`d` `a` `c` `b`}
@@ -413,14 +417,14 @@ Examples
413417
414418Accumulate
415419
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`.
417421
418422Accepts
419423--------
420424
421−`a` is a [`++set`]().
425+`a` is a `++set`.
422426
423−`b` is a [noun]().
427+`b` is a noun.
424428
425429`c` is a gate.
426430
@@ -432,21 +436,21 @@ A noun.
432436Source
433437------
434438
435− +- rep :: replace by tile
436− |* [b=* c=_,*]
437− |-
438− ?~ a b
439− $(a r.a, b $(a l.a, b (c n.a b)))
440− ::
439+ +- rep :: replace by product
440+ |* b/_|=({* *} +<+)
441+ |-
442+ ?~ a +<+.b
443+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
444+
441445
442446
443447Examples
444448--------
445449
446− ~zod/try=> =a (~(gas in *(set ,@)) [1 2 3 ~])
450+ ~zod/try=> =a (~(gas in *(set @)) [1 2 3 ~])
447451 ~zod/try=> a
448452 {1 3 2}
449− ~zod/try=> (~(rep in a) 0 |=([a=@ b=@] (add a b)))
453+ ~zod/try=> (~(rep in a) 0 |=([a/@ b/@] (add a b)))
450454 6
451455
452456------------------------------------------------------------------------
@@ -455,7 +459,7 @@ Examples
455459
456460Set to list
457461
458−Flattens the [`++set`]() `a` into a [`++list`]().
462+Flattens the `++set` `a` into a `++list`.
459463
460464Accepts
461465-------
@@ -470,23 +474,24 @@ A list.
470474Source
471475------
472476
473− +- tap :: list tiles a set
477+ +- tap :: convert to list
474478 ~/ %tap
475− |= b=(list ,_?>(?=(^ a) n.a))
479+ |= b/(list _?>(?=(^ a) n.a))
476480 ^+ b
477481 ?~ a
478482 b
479− $(a r.a, b [n.a $(a l.a)])
483+ $(a r.a b [n.a $(a l.a)])
480484 ::
481485
482486
487+
483488Examples
484489--------
485490
486− ~zod/try=> =s (sa `(list ,@t)`['a' 'b' 'c' 'd' 'e' ~])
491+ ~zod/try=> =s (sa `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
487492 ~zod/try=> s
488493 {'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' ~])
490495 ~['b' 'c' 'a' 'd' 'e' '1' '2' '3']
491496 ~zod/try=> b
492497 {'bonita' 'madeleine' 'daniel' 'john'}
@@ -519,7 +524,8 @@ Source
519524
520525 +- uni :: union
521526 ~/ %uni
522− |* b=_a
527+ |* b/_a
528+ ?: =(a b) a
523529 |- ^+ a
524530 ?~ b
525531 a
@@ -536,6 +542,7 @@ Source
536542 ?: (hor n.a n.b)
537543 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
538544 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
545+ ::
539546
540547
541548Examples
@@ -574,6 +581,8 @@ Source
574581 +- wyt :: size of set
575582 |- ^- @
576583 ?~(a 0 +((add $(a l.a) $(a r.a))))
584+ --
585+
577586
578587
579588Examples