aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-05-16 10:46:04 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-05-16 10:46:04 -0400
commit7a16ca3a4841e697021a0899e0570f4ada6e05ad (patch)
tree686b4abe1f67151092765bef8cb642efae2616a3 /src
parentd93857e9c726e2fde5ce2e66fde25dacec7f3999 (diff)
Check for structural Under setting fills
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 fe4db087..38b1aa11 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -330,7 +330,7 @@ structConform ← {𝕎◶0‿𝕏}´⟨IsArray⊢, =○=, MatchS○≢⟩
_under_←{
val←𝕨𝔽○𝔾𝕩
# Construct indices
- Inds ← IsArray◶⟨0,⥊⟜(↕1×´⊢)≢⟩ 𝕩 ⊑⟜⥊⍟(IsArray⊢)´ Reverse
+ Inds ← IsArray◶⟨0,@Fill⥊⟜(↕1×´⊢)∘≢⟩ 𝕩 ⊑⟜⥊⍟(IsArray⊢)´ Reverse
_s_ ← {
f←𝕗
st‿d‿o←𝕩
@@ -363,6 +363,7 @@ _under_←{
Set1←𝕨⊸{
𝕩↩ToArray𝕩
s←≢𝕩⋄l←≠d←⥊𝕩
+ "Cannot modify fill with Structural Under"!1∧´@⊸>⌜i
gl←l GroupLen i ⋄ v⊏˜↩gl GroupOrd i
j←0⋄Adv←{(j+↩𝕩)-1}⊑v˙
CM←"⌾: Incompatible result elements in structural Under"!Match