aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/r.bqn7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/r.bqn b/src/r.bqn
index 7e8a7ec1..05245221 100644
--- a/src/r.bqn
+++ b/src/r.bqn
@@ -580,9 +580,10 @@ _repeat_←{
n←𝕨𝔾𝕩
l←u←0
{"⍟: Repetition numbers in 𝕨 must be integers"!Int𝕩⋄l↩lβŒŠπ•©β‹„u↩uβŒˆπ•©}βš‡0 n
- a←𝕩⋄_p←{π”½βˆ˜βŠ£`⟨aβŸ©βˆΎβ†•0+𝕩}
- pos←(𝕨𝔽 ⊒)_p u
- neg←(π•¨π”½βΌβŠ’)_p-l
+ b←𝕨{π•βŠ£}Λ™βŠ˜{𝕨˙{π”½π•βŠ£}}0
+ iβ†βŸ¨π•©βŸ©β‹„P←B⊸{π•Ž`iβˆΎβ†•π•©}
+ pos←𝕗 P u
+ neg←𝕗 Inverse⊸P -l
(|βŠ‘<⟜0βŠ‘posβ€ΏnegΛ™)βš‡0 n
}