aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-02-15 20:52:54 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-02-15 20:59:31 -0500
commit19d4e4da6a93deb398f87bb6b42b1b1ee3c4926e (patch)
treecba3ffb2e035aae2cc828d3289f5e586c2bd4589 /src
parent4fd3566067b123ba53e0923520bdc8e19fad7d83 (diff)
Give an empty result, not an error, whenever 𝕨 is longer than 𝕩 in Find
Diffstat (limited to 'src')
-rw-r--r--src/r.bqn4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/r.bqn b/src/r.bqn
index 702de192..84adec0c 100644
--- a/src/r.bqn
+++ b/src/r.bqn
@@ -646,8 +646,8 @@ SelfClas ← (PermInvβˆ˜β‹βˆ˜/˜⊏˜1-˜+`∘⊒) _self
Find←{
r←=𝕨
"⍷𝕩: Rank of 𝕨 cannot exceed rank of 𝕩" ! r≀=𝕩
- 0 Fill 𝕨 β‰‘βŽ‰r (≒𝕨) β†•βŽ‰r 𝕩
-}
+ 0 Fill 𝕨 β‰‘βŽ‰r ((1+r-βŠΈβ†‘β‰’π•©)βŒŠβ‰’π•¨)βŠΈβ†•βŽ‰r 𝕩
+}β—‹ToArray
≍ ← >∘Pair _fillBy_ (⊒⊘IF)
∾ ↩ Join ⊘ JoinTo