diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-04 08:02:18 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-04 08:02:22 -0500 |
| commit | 64868f670243fdc64f6f0bed28d4c9c31ef98966 (patch) | |
| tree | 2d89446e9fe49c021f59a0f6d4784ccf83048f0b /src | |
| parent | 5df53ddd256ce99123a874a3fece3408638d9400 (diff) | |
Fix fill counting for Take with atom 𝕨 and high-rank 𝕩 (fixes #52)
Diffstat (limited to 'src')
| -rw-r--r-- | src/r1.bqn | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -525,7 +525,7 @@ _takeDrop←{ l←𝕨p◶⟨0⌈+,⌊⟩≠𝕩 F←𝕩{(Fill𝕗)˙⌜↕𝕩} k←1⋄S←⊢ ⋄ 𝕨⊸{k×´↩c←1 Cell𝕩 ⋄ S↩(⟨(0⌈(≠𝕩)-⊢)⍟(1-take)|𝕨⟩∾c)⊸⥊}⍟(1<=) 𝕩 - S ((|∘𝕨-≠){𝕩p◶⟨∾˜,∾⟩F𝕨×k}⍟(>⟜0)⊢)⍟take (l×k) (take=p)◶↓‿↑ ⥊𝕩 + S ((|∘𝕨-≠∘𝕩){𝕩p◶⟨∾˜,∾⟩F𝕨×k}⍟(>⟜0)⊢)⍟take (l×k) (take=p)◶↓‿↑ ⥊𝕩 }‿{ ernk ! 1≥=𝕨 𝕨 ↩ ⥊𝕨 |
