diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-24 21:55:45 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-24 21:55:45 -0400 |
| commit | b60fd36b9eb6b245c848502f388dc7f5b3f9131d (patch) | |
| tree | 858876a54f894c9c3f5480af122ba87595c38100 /src | |
| parent | a717221a7dd2fb88ff9d5d07e221a83dc558b47d (diff) | |
Prevent nudge of empty array from requiring a fill
Diffstat (limited to 'src')
| -rw-r--r-- | src/r1.bqn | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -551,12 +551,12 @@ ShiftCheck←{ ShiftBefore←{ n←𝕨 ShiftCheck 𝕩 m←n⌊l←≠d←⥊𝕩 - (≢𝕩) ⥊ (𝕨{(Fill𝕩)⌜↕𝕨}⟜𝕩⊘(↑⟜Deshape˜)m) ∾ (l-m)↑d + (≢𝕩) ⥊ (𝕨{(Fill𝕩)⌜↕𝕨}⍟(0<l)⟜𝕩⊘(↑⟜Deshape˜)m) ∾ (l-m)↑d } _fillBy_ (⊢⊘IF) ShiftAfter←{ n←𝕨 ShiftCheck 𝕩 - m←n⌊≠d←⥊𝕩 - (≢𝕩) ⥊ (m↓d) ∾ 𝕨{(Fill𝕩)⌜↕𝕨}⟜𝕩⊘(n⊸-⊸↓⟜Deshape˜)m + m←n⌊l←≠d←⥊𝕩 + (≢𝕩) ⥊ (m↓d) ∾ 𝕨{(Fill𝕩)⌜↕𝕨}⍟(0<l)⟜𝕩⊘(n⊸-⊸↓⟜Deshape˜)m } _fillBy_ (⊢⊘IF) RangeCheck ← "↕𝕩: 𝕩 must consist of natural numbers"!Nat |
