diff options
| -rw-r--r-- | impl.bqn | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -136,6 +136,19 @@ _under_←{ ≤ ↩ !∘0 ⊘ (≤ _perv) identity ← (0⊑⟨!∘0⟩) {(0⊑𝕨){𝕗=𝕩}◶𝕩‿(1⊑𝕨)}´ ⟨+‿0,-‿0,×‿1,÷‿1,⋆‿1,√‿1,∧‿1,∨‿0,|‿0,⌊‿∞,⌈‿¯∞,<‿0,≤‿1,=‿1,≥‿1,>‿0,≠‿0⟩ +SelSub←{ + ! IsArray 𝕨 + ! 1×´⥊Int¨ 𝕨 + l←≠𝕩 + ! 1×´⥊ ((-l)⊸≤×l⊸>)¨ 𝕨 + ((⊢+l×0>⊢)¨𝕨)(1==𝕩)◶{ + c←1×´s←1 Cell 𝕩 + 𝕨((⥊𝕩)⊑˜c⊸×⊸+)⌜s⥊↕c + }‿{ + ⊑⟜𝕩¨𝕨 + }𝕩 +} + #⌜ # LAYER 3: Remove other limits @@ -226,18 +239,6 @@ _onAxes_←{ } } -SelSub←{ - ! IsArray 𝕨 - ! ∧´⥊Int¨ 𝕨 - ! ∧´⥊ 𝕨 (≥⟜-∧<) ≠𝕩 - 𝕨↩𝕨+(≠𝕩)×𝕨<0 - 𝕨(1≠=∘⊢)◶{ - ⊑⟜𝕩¨𝕨 - }‿{ - c←×´s←1 Cell 𝕩 - ⊑⟜(⥊𝕩)¨(c×𝕨)+⌜s⥊↕c - }𝕩 -} Select←ToArray⊸(SelSub _onAxes_ 1) ⊏ ← 0⊸Select ⊘ Select |
