12Core whose arms contain a variety of functions that operate on `++set`s. Its sample accepts the input `++set` to be manipulated.
30 <13.evb [nlr(^$1{@tD $1}) <414.fvk 101.jzo 1.ypj %164>]>
36Computes the logical AND on every element in `a` slammed with `b`,
44`b` is a wet gate that accepts a noun and produces a boolean.
60 ?&((b n.a) $(a l.a) $(a r.a))
66 > =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
67 > (~(all in b) |=(a/* ?@(+.a & |)))
69 > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
70 > (~(all in b) |=(a/@t (gte a 100)))
73------------------------------------------------------------------------
79Computes the logical OR on every element of `a` slammed with `b`.
86`b` is a gate that accepts a noun and produces a boolean.
102 ?|((b n.a) $(a l.a) $(a r.a))
109 > =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
110 > (~(any in b) |=(a/* ?@(+.a & |)))
112 > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
113 > (~(any in b) |=(a/@t (lte a 100)))
116------------------------------------------------------------------------
122Removes `b` from the `++set` `a`.
139 +- del :: b without any a
153 [n.l.a l.l.a $(l.a r.l.a)]
154 [n.r.a $(r.a l.r.a) r.r.a]
161 > =b (sa `(list @t)`['a' 'b' 'c' ~])
164 > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
165 > (~(del in b) 'john')
166 {'bonita' 'madeleine' 'daniel'}
167 > (~(del in b) 'susan')
168 {'bonita' 'madeleine' 'daniel' 'john'}
170------------------------------------------------------------------------
176Produce the axis of `b` within `a`.
188The `++unit` of an atom.
193 +- dig :: axis of a in b
198 ?: =(b n.a) [~ u=(peg c 2)]
200 $(a l.a, c (peg c 6))
201 $(a r.a, c (peg c 7))
209 > =a (sa `(list @)`[1 2 3 4 5 6 7 ~])
221------------------------------------------------------------------------
227Insert the elements of a `++list` `b` into a `++set` `a`.
244 +- gas :: concatenate
246 |= b/(list _?>(?=(^ a) n.a))
250 $(b t.b, a (put i.b))
258 {'bonita' 'madeleine' 'rudolf' 'john'}
259 > (~(gas in b) `(list @t)`['14' 'things' 'number' '1.337' ~])
260 {'1.337' '14' 'number' 'things' 'bonita' 'madeleine' 'rudolf' 'john'}
261 > (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
262 {'1' '3' '2' 'e' 'd' 'a' 'c' 'b'}
264------------------------------------------------------------------------
270Checks if `b` is an element of `a`, producing a boolean.
287 +- has :: b exists in a check
304 > =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
310------------------------------------------------------------------------
316Produces a set of the intersection between two `++set`s of the same type,
334 +- int :: intersection
345 [n.a $(a l.a, b l.b) $(a r.a, b r.b)]
347 %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
348 %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
356 > (~(int in (sa "ac")) (sa "ha"))
358 > (~(int in (sa "acmo")) ~)
360 > (~(int in (sa "acmo")) (sa "ham"))
362 > (~(int in (sa "acmo")) (sa "lep"))
365------------------------------------------------------------------------
371Add an element `b` to the `++set` `a`.
388 +- put :: puts b in a, sorted
401 [n.c l.c [n.a r.c r.a]]
406 [n.c [n.a l.a l.c] r.c]
413 > =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
414 > =b (~(put in a) `d`)
420------------------------------------------------------------------------
426Accumulate the elements of `a` using a gate `c` and an accumulator `b`.
445 +- rep :: replace by product
449 $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
456 > =a (~(gas in *(set @)) [1 2 3 ~])
459 > (~(rep in a) 0 |=([a/@ b/@] (add a b)))
462------------------------------------------------------------------------
468Flattens the `++set` `a` into a `++list`.
483 +- tap :: convert to list
485 |= b/(list _?>(?=(^ a) n.a))
489 $(a r.a b [n.a $(a l.a)])
497 > =s (sa `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
499 {'e' 'd' 'a' 'c' 'b'}
500 > (~(tap in s) `(list @t)`['1' '2' '3' ~])
501 ~['b' 'c' 'a' 'd' 'e' '1' '2' '3']
503 {'bonita' 'madeleine' 'daniel' 'john'}
504 ~zod/try=> (~(tap in b) `(list ,@t)`['david' 'people' ~])
505 ~['john' 'daniel' 'madeleine' 'bonita' 'david' 'people']
507------------------------------------------------------------------------
513Produces a set of the union between two [`++set`]()s of the same type, `a` and
542 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
544 $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
545 $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
547 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
549 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
550 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
557 > (~(uni in (sa "ac")) (sa "ha"))
559 > (~(uni in (sa "acmo")) ~)
561 > (~(uni in (sa "acmo")) (sa "ham"))
562 {~~a ~~c ~~m ~~o ~~h}
563 > (~(uni in (sa "acmo")) (sa "lep"))
564 {~~e ~~a ~~c ~~m ~~l ~~o ~~p}
566------------------------------------------------------------------------
572Produce the number of elements in [`++set`]() `a` as an atom.
587 +- wyt :: size of set
589 ?~(a 0 +((add $(a l.a) $(a r.a))))
597 > =a (~(put in (~(put in (sa)) 'a')) 'b')
601 {'bonita' 'madeleine' 'daniel' 'john'}
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list