aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2023-01-02 20:37:07 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2023-01-02 20:37:07 -0500
commit585c523c9c8700ca435168e29560223f0b71cb51 (patch)
tree0ff0c9e2309f7b6b3475b2ee137dd1cf27c674a4 /src
parentececc6ec2a5b1e849b92f96fb6a95ecef8891d44 (diff)
Inspect right operand of ◶ when checking if functions are pure
Diffstat (limited to 'src')
-rw-r--r--src/r1.bqn3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/r1.bqn b/src/r1.bqn
index b173b892..f8768100 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -351,7 +351,8 @@ Replicate←⟨"/"
RepInd
⟩_multiAxis○ToArray _fillBy_ ⊢
-IsPure ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1×´·𝕊⌜1↓d˙⟩0⊑d}
+IsPure ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, (ChPure×´·𝕊⌜1⊸↓)d˙⟩0⊑d}
+ChPure ← (5=0⊸⊑)◶⟨1,('◶'_isGlyph 2⊸⊑)◶⟨1,1×´·IsPure⌜·⥊3⊸⊑⟩⟩
hfils ← {𝕏´{0 Fill 𝕏}‿⊢}⌜(⊢∾{𝕏˜}⌜)⊢‿{𝕎{𝕎⊘𝕏}𝕏}
HomFil ← "=≠≡≢"_glyphLookup_(1‿1‿2‿3‿0⊏hfils)⊸{𝕎𝕩}
_fillByPure_←{