diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-06-05 09:23:52 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-06-05 09:23:52 -0400 |
| commit | 8621b0a88c17aa8e2fe7f3c52b679d6912ef0cb4 (patch) | |
| tree | 581496dfb9499b2deb9817a8be92d3f942c824f9 /src | |
| parent | 79a3de138fa0ab737aa30e05e8d8fae89f90a77f (diff) | |
Always treat ⁼ results as pure functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/r1.bqn | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 ← { |
