aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-06-05 09:23:52 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-06-05 09:23:52 -0400
commit8621b0a88c17aa8e2fe7f3c52b679d6912ef0cb4 (patch)
tree581496dfb9499b2deb9817a8be92d3f942c824f9 /src
parent79a3de138fa0ab737aa30e05e8d8fae89f90a77f (diff)
Always treat ⁼ results as pure functions
Diffstat (limited to 'src')
-rw-r--r--src/r1.bqn5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/r1.bqn b/src/r1.bqn
index 8e299aa5..024460df 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -322,7 +322,7 @@ Replicate←⟨"/"
RepInd
⟩_multiAxis○ToArray _fillBy_ ⊢
-IsPure ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1×´·𝕊⌜1↓d˙⟩0⊑d}
+IsPure ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, DNotInv◶⟨1,1×´·𝕊⌜1↓⊢⟩d˙⟩0⊑d}
hfils ← {𝕏´{0 Fill 𝕏}‿⊢}⌜(⊢∾{𝕏˜}⌜)⊢‿{𝕎{𝕎⊘𝕏}𝕏}
HomFil ← "=≠≡≢"_glyphLookup_(1‿1‿2‿3‿0⊏hfils)⊸{𝕎𝕩}
_fillByPure_←{
@@ -768,7 +768,8 @@ ReorderAxesInv←{
⁼ ← {Inverse 𝕗}
_inv_ ← {𝕘⋄𝕨𝔽𝕩}
-_undo ← {𝕗 (≢∧INF˙⊸≢)◶0‿((5=0⊸⊑)◶1‿(inv˙≢(≠-2˙)⊸⊑)∘Decompose⊢)◶⊢‿{𝕏_inv_(𝕎_invChk_𝕏)} Inverse 𝕗}
+DNotInv ← (5=0⊸⊑)◶1‿(inv˙≢(≠-2˙)⊸⊑)
+_undo ← {𝕗 (≢∧INF˙⊸≢)◶0‿(DNotInv∘Decompose⊢)◶⊢‿{𝕏_inv_(𝕎_invChk_𝕏)} Inverse 𝕗}
IsConstant ← (3≤Type)◶⟨1 ⋄ (4=0⊸⊑)◶0‿('˙'_isGlyph(≠-1˙)⊸⊑)∘{Decompose𝕩}⊢⟩
AtopInverse ← {(𝕏𝕎)⊘(𝕏⟜𝕎)}○{Inverse𝕩}
TrainInverse ← {