aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-28 19:57:32 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-28 19:57:32 -0400
commit980ad57073f67f4f26d3d3fd890ac089c409fab8 (patch)
tree2f73a2f4ac378e3b0a925183396bcbf375e210e0
parente509ae3774b171e7f430517a9757a22883e165ef (diff)
Simpler way to find containing function
-rwxr-xr-xc.bqn5
1 files changed, 1 insertions, 4 deletions
diff --git a/c.bqn b/c.bqn
index 39aef9ff..e2b213ad 100755
--- a/c.bqn
+++ b/c.bqn
@@ -51,10 +51,7 @@ Parse←{
l←≠𝕩⋄sep←𝕩∊bS⋄𝕩↩(bF⊑˜chF⊐<'⊣')¨⌾(sep⊸/)𝕩
o←𝕩=0⊑bB⋄c←𝕩=1⊑bB⋄v←a-˜𝕩≥vi⋄f←¬o∨c∨v∨sep
na←(2×sep)+f×1+l↑0∾c∨v
- e←/c⋄d←+`o-c
- ed←e⊏d⋄b←(⍋⍋ed)⊏(⍋⊏⟜d)⊸⊏/o
- g←⊔ed∾0⋄s←e-(e⊏˜∾(<(⍋⊏⊣)´)˘2↕g)⌾((∾1↓g)⊸⊏)l¨e
- fe←f×(l-1)++`(-⊸≍s)⌾((e≍b)⊸⊏)l⥊0
+ d←+`o-c⋄fe←f×1-˜(+`⌾((⍋d)⊸⊏)o)⊏l∾(⍋⊏⟜d)⊸⊏/c
fe⌊↩(l-1)-l↑(⌈`↕∘≠⊸×)⌾⌽1∾˜sep
ia←+`l↑0∾f-l↑/⁼∧f/fe
sel←¬∘⊏⟜(o∨c)⊸/⍋(fe⌈↕l)-ia