aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-07 19:07:48 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-07 19:12:06 -0500
commit0863b443d1d052cb684e3707a244727f693fba04 (patch)
tree89a5f317d24cabc6a23de7995b2403e9726a465e /src
parent9429ddcf83c1e88a328160b40a124ea9a140005b (diff)
Add SetInv to extend inverse finder
Diffstat (limited to 'src')
-rwxr-xr-xsrc/pr.bqn2
-rw-r--r--src/r1.bqn1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/pr.bqn b/src/pr.bqn
index 9f836a3c..7b01d593 100755
--- a/src/pr.bqn
+++ b/src/pr.bqn
@@ -27,6 +27,6 @@ GetRepls ← { c‿n←𝕩 ⋄ ⟨c,c⊣⌾((c∊⥊¨in)⊸/)n⟩∾¨⟨def,
rslt ← "⟨"∾"⟩"«∾","⊸∾¨out # Output all primitives
raw ← (•FChars "r"∾'0'⊸+∾".bqn"˙)¨ rtn
-{𝕤⋄ raw∾˜↩⟨"glyphs←"""∾out∾"%"""⟩ ⋄ rslt∾˜↩"{PrimInd↩⊑𝕩⊐<⋄𝕩‿SetPrims}"}⍟⊢ ∨´1=rtn
+{𝕤⋄ raw∾˜↩⟨"glyphs←"""∾out∾"%"""⟩ ⋄ rslt∾˜↩"{PrimInd↩⊑𝕩⊐<⋄𝕩‿SetPrims‿SetInv}"}⍟⊢ ∨´1=rtn
raw ∾↩ ⟨rslt⟩
src ⇐ E_proc ∾∾⟜(@+10)¨ raw
diff --git a/src/r1.bqn b/src/r1.bqn
index a27207b0..8d24ec61 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -7,6 +7,7 @@
Decompose ← {0‿𝕩}
PrimInd ← {𝕩}
SetPrims ← {Decompose‿PrimInd ↩ 𝕩}
+SetInv ← {inverse 𝕏↩}
IsArray ← 0=Type
IsAtom ← 1≤Type