7Core whose arms contain a variety of functions that operate on `++set`s. Its sample accepts the input `++set` to be manipulated.
25 <13.evb [nlr(^$1{@tD $1}) <414.fvk 101.jzo 1.ypj %164>]>
31Computes the logical AND on every element in `a` slammed with `b`,
39`b` is a wet gate that accepts a noun and produces a boolean.
55 ?&((b n.a) $(a l.a) $(a r.a))
61 > =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
62 > (~(all in b) |=(a/* ?@(+.a & |)))
64 > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
65 > (~(all in b) |=(a/@t (gte a 100)))
68------------------------------------------------------------------------
74Computes the logical OR on every element of `a` slammed with `b`.
81`b` is a gate that accepts a noun and produces a boolean.
97 ?|((b n.a) $(a l.a) $(a r.a))
104 > =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
105 > (~(any in b) |=(a/* ?@(+.a & |)))
107 > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
108 > (~(any in b) |=(a/@t (lte a 100)))
111------------------------------------------------------------------------
117Removes `b` from the `++set` `a`.
134 +- del :: b without any a
148 [n.l.a l.l.a $(l.a r.l.a)]
149 [n.r.a $(r.a l.r.a) r.r.a]
156 > =b (sa `(list @t)`['a' 'b' 'c' ~])
159 > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
160 > (~(del in b) 'john')
161 {'bonita' 'madeleine' 'daniel'}
162 > (~(del in b) 'susan')
163 {'bonita' 'madeleine' 'daniel' 'john'}
165------------------------------------------------------------------------
171Produce the axis of `b` within `a`.
183The `++unit` of an atom.
188 +- dig :: axis of a in b
193 ?: =(b n.a) [~ u=(peg c 2)]
195 $(a l.a, c (peg c 6))
196 $(a r.a, c (peg c 7))
204 > =a (sa `(list @)`[1 2 3 4 5 6 7 ~])
216------------------------------------------------------------------------
222Insert the elements of a `++list` `b` into a `++set` `a`.
239 +- gas :: concatenate
241 |= b/(list _?>(?=(^ a) n.a))
245 $(b t.b, a (put i.b))
253 {'bonita' 'madeleine' 'rudolf' 'john'}
254 > (~(gas in b) `(list @t)`['14' 'things' 'number' '1.337' ~])
255 {'1.337' '14' 'number' 'things' 'bonita' 'madeleine' 'rudolf' 'john'}
256 > (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
257 {'1' '3' '2' 'e' 'd' 'a' 'c' 'b'}
259------------------------------------------------------------------------
265Checks if `b` is an element of `a`, producing a boolean.
282 +- has :: b exists in a check
299 > =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
305------------------------------------------------------------------------
311Produces a set of the intersection between two `++set`s of the same type,
329 +- int :: intersection
340 [n.a $(a l.a, b l.b) $(a r.a, b r.b)]
342 %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
343 %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
351 > (~(int in (sa "ac")) (sa "ha"))
353 > (~(int in (sa "acmo")) ~)
355 > (~(int in (sa "acmo")) (sa "ham"))
357 > (~(int in (sa "acmo")) (sa "lep"))
360------------------------------------------------------------------------
366Add an element `b` to the `++set` `a`.
383 +- put :: puts b in a, sorted
396 [n.c l.c [n.a r.c r.a]]
401 [n.c [n.a l.a l.c] r.c]
408 > =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
409 > =b (~(put in a) `d`)
415------------------------------------------------------------------------
421Accumulate the elements of `a` using a gate `c` and an accumulator `b`.
440 +- rep :: replace by product
444 $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
451 > =a (~(gas in *(set @)) [1 2 3 ~])
454 > (~(rep in a) 0 |=([a/@ b/@] (add a b)))
457------------------------------------------------------------------------
463Flattens the `++set` `a` into a `++list`.
478 +- tap :: convert to list
480 |= b/(list _?>(?=(^ a) n.a))
484 $(a r.a b [n.a $(a l.a)])
492 > =s (sa `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
494 {'e' 'd' 'a' 'c' 'b'}
495 > (~(tap in s) `(list @t)`['1' '2' '3' ~])
496 ~['b' 'c' 'a' 'd' 'e' '1' '2' '3']
498 {'bonita' 'madeleine' 'daniel' 'john'}
499 ~zod/try=> (~(tap in b) `(list ,@t)`['david' 'people' ~])
500 ~['john' 'daniel' 'madeleine' 'bonita' 'david' 'people']
502------------------------------------------------------------------------
508Produces a set of the union between two [`++set`]()s of the same type, `a` and
537 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
539 $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
540 $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
542 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
544 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
545 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
552 > (~(uni in (sa "ac")) (sa "ha"))
554 > (~(uni in (sa "acmo")) ~)
556 > (~(uni in (sa "acmo")) (sa "ham"))
557 {~~a ~~c ~~m ~~o ~~h}
558 > (~(uni in (sa "acmo")) (sa "lep"))
559 {~~e ~~a ~~c ~~m ~~l ~~o ~~p}
561------------------------------------------------------------------------
567Produce the number of elements in [`++set`]() `a` as an atom.
582 +- wyt :: size of set
584 ?~(a 0 +((add $(a l.a) $(a r.a))))
592 > =a (~(put in (~(put in (sa)) 'a')) 'b')
596 {'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