From 768e5be04ef9fe11e2219c01b502614d3cf2764c Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 30 Apr 2021 10:52:07 -0400 Subject: Implement Indices using GroupLen --- src/r1.bqn | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/r1.bqn b/src/r1.bqn index 57166278..36f9f90c 100644 --- a/src/r1.bqn +++ b/src/r1.bqn @@ -193,15 +193,8 @@ _self←{ Indices←{ "/: Replication argument must have rank 1" ! 1==𝕩 - l←≠𝕩 - 0 Fill { - "/: Amounts to replicate must be natural numbers" ! 1×´Nat⌜𝕩 - k←l-1 - N ← ((⊢+-×0=𝕩⊑˜⊢)`k⊸-⌜↕l)⊑˜k-⊢ # Next nonzero - E ← ⊑⟜(+`𝕩) - ei←E i←N 0 - {{ei↩E i↩N𝕩+1⋄i}⍟(𝕩=ei)i}⌜↕E k - }⍟(0