From 7a16ca3a4841e697021a0899e0570f4ada6e05ad Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 16 May 2021 10:46:04 -0400 Subject: Check for structural Under setting fills --- src/r1.bqn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3