set difference jets

This commit is contained in:
Raymond Pasco 2015-07-02 01:21:38 -04:00
parent 11c6486bcc
commit e88a091e56

View File

@ -1892,6 +1892,24 @@
|
?|((b n.a) $(a l.a) $(a r.a))
::
+- bif :: splits a by b
~/ %bif
|* b=*
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[b ~ ~]
?: =(b n.a)
a
?: (hor b n.a)
=+ c=$(a l.a)
?> ?=(^ c)
[n.c l.c [n.a r.c r.a]]
=+ c=$(a r.a)
?> ?=(^ c)
[n.c [n.a l.a l.c] r.c]
::
+- del :: b without any a
~/ %del
|* b=*
@ -1915,7 +1933,7 @@
|- ^+ a
?~ b
a
=+ c=(pux(+< a) n.b)
=+ c=(bif(+< a) n.b)
?> ?=(^ c)
=+ d=$(a l.c, b l.b)
=+ e=$(a r.c, b r.b)
@ -1992,24 +2010,6 @@
[n.a l.a c]
[n.c [n.a l.a l.c] r.c]
::
+- pux :: splits a by b
~/ %pux
|* b=*
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[b ~ ~]
?: =(b n.a)
a
?: (hor b n.a)
=+ c=$(a l.a)
?> ?=(^ c)
[n.c l.c [n.a r.c r.a]]
=+ c=$(a r.a)
?> ?=(^ c)
[n.c [n.a l.a l.c] r.c]
::
+- rep :: replace by product
|* b=_|=([* *] +<+)
|-
@ -2128,6 +2128,26 @@
|
?|((b q.n.a) $(a l.a) $(a r.a))
::
+- bif :: splits a by b
~/ %bif
|* [b=* c=*]
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[[b c] ~ ~]
?: =(b p.n.a)
?: =(c q.n.a)
a
[[b c] l.a r.a]
?: (gor b p.n.a)
=+ d=$(a l.a)
?> ?=(^ d)
[n.d l.d [n.a r.d r.a]]
=+ d=$(a r.a)
?> ?=(^ d)
[n.d [n.a l.a l.d] r.d]
::
+- del :: delete at key b
~/ %del
|* b=*
@ -2151,7 +2171,7 @@
|- ^+ a
?~ b
a
=+ c=(pux(+< a) n.b)
=+ c=(bif(+< a) n.b)
?> ?=(^ c)
=+ d=$(a l.c, b l.b)
=+ e=$(a r.c, b r.b)
@ -2251,26 +2271,6 @@
[n.a l.a d]
[n.d [n.a l.a l.d] r.d]
::
+- pux :: splits a by b
~/ %pux
|* [b=* c=*]
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[[b c] ~ ~]
?: =(b p.n.a)
?: =(c q.n.a)
a
[[b c] l.a r.a]
?: (gor b p.n.a)
=+ d=$(a l.a)
?> ?=(^ d)
[n.d l.d [n.a r.d r.a]]
=+ d=$(a r.a)
?> ?=(^ d)
[n.d [n.a l.a l.d] r.d]
::
+- rep :: replace by product
|* b=_|=([* *] +<+)
|-