From 8621b0a88c17aa8e2fe7f3c52b679d6912ef0cb4 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 5 Jun 2021 09:23:52 -0400 Subject: =?UTF-8?q?Always=20treat=20=E2=81=BC=20results=20as=20pure=20func?= =?UTF-8?q?tions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/r1.bqn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 ← { -- cgit v1.2.3