aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-01-20 20:15:37 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-01-20 20:15:37 -0500
commit675c5af3a9980a598e4ae30521a1cafe9f9fac10 (patch)
tree12819acced094ac3bacb4903a7fa5288cca6d78a /src
parent75c3c676f141ea0a234d600bf899d17ad608d70d (diff)
Fill support for ¨ and ⌜ with operands not containing blocks
Diffstat (limited to 'src')
-rw-r--r--src/r.bqn9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/r.bqn b/src/r.bqn
index 3940e5b8..75ef8c09 100644
--- a/src/r.bqn
+++ b/src/r.bqn
@@ -168,7 +168,12 @@ SelSub←{
}
First ← (0<≠)◶⟨Fill,0⊸⊑⟩ Deshape
-¨ ↩ {𝕨(𝔽⌜)⊘(𝔽_eachd)○ToArray𝕩}
+_fillByPure_←{
+ p ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1(𝕊d⊑˜1⊸+)⊸×´·↕1-˜≠∘d⟩0⊑d} 𝕘
+ p⊑⟨𝕗,𝕗_fillBy_𝕘⟩
+}
+
+¨ ↩ {𝕨𝔽⌜⊘(𝔽_eachd)_fillByPure_𝔽○ToArray𝕩}
StructErr←{𝕩}
IsStructErr ← (3=Type)◶⟨0,StructErr˙⊸=⟩
@@ -744,7 +749,7 @@ PrimInverse ← INF _lookup_ ⟨
/, {IA 1==𝕩⋄IA∧´Nat⌜𝕩⋄IX(∧´¯1⊸↓≤1⊸↓)𝕩⋄GroupLen𝕩}⊘(IA∘0)
⊔, GroupIndsInv ⊘ GroupInv
-⌜ ↩ {𝕨𝔽⌜○ToArray𝕩}
+⌜ ↩ {𝕨𝔽⌜_fillByPure_𝔽○ToArray𝕩}
_inv_ ← {𝕘⋄𝕨𝔽𝕩}
AtopInverse ← {(𝕏𝕎)⊘(𝕏⟜𝕎)}○{Inverse𝕩}
Mod1Inverse ← INF˙ _lookup_ ⟨