aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-04 08:02:18 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-04 08:02:22 -0500
commit64868f670243fdc64f6f0bed28d4c9c31ef98966 (patch)
tree2d89446e9fe49c021f59a0f6d4784ccf83048f0b /src
parent5df53ddd256ce99123a874a3fece3408638d9400 (diff)
Fix fill counting for Take with atom 𝕨 and high-rank 𝕩 (fixes #52)
Diffstat (limited to 'src')
-rw-r--r--src/r1.bqn2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/r1.bqn b/src/r1.bqn
index 0aadb95b..1175a655 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -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≥=𝕨
𝕨 ↩ ⥊𝕨