diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-16 10:46:04 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-16 10:46:04 -0400 |
| commit | 7a16ca3a4841e697021a0899e0570f4ada6e05ad (patch) | |
| tree | 686b4abe1f67151092765bef8cb642efae2616a3 /src | |
| parent | d93857e9c726e2fde5ce2e66fde25dacec7f3999 (diff) | |
Check for structural Under setting fills
Diffstat (limited to 'src')
| -rw-r--r-- | src/r1.bqn | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |
