aboutsummaryrefslogtreecommitdiff
path: root/impl.bqn
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-04 20:30:36 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-05 17:41:05 -0400
commitda75b4391dd6ffc13da949c2ee5e2c97000692d0 (patch)
treec8c7b7fe6bf93e9b40036e9a236c9486945d6e0a /impl.bqn
parent79bcb4dcb4cbb2c2ce5fe09db1f7a523b1f3451b (diff)
More obvious implementation of First
Diffstat (limited to 'impl.bqn')
-rw-r--r--impl.bqn2
1 files changed, 1 insertions, 1 deletions
diff --git a/impl.bqn b/impl.bqn
index df067c0f..d05ff710 100644
--- a/impl.bqn
+++ b/impl.bqn
@@ -407,7 +407,7 @@ OccurrenceCount ← ⊐˜(⊢-⊏)⍋∘⍋
ProgressiveIndexOf ← {𝕨⊐○(≍˘⟜OccurrenceCount𝕨⊸⊐)𝕩}
⊒ ← OccurrenceCount⊘ ProgressiveIndexOf
-⊑ ↩ (0¨∘≢)⊸Pick ⊘ Pick
+⊑ ↩ (0⊑⥊) ⊘ Pick
◶ ↩ {𝕨((𝕨𝔽𝕩)⊑𝕘){𝔽}𝕩} # Same definition, new Pick
inverse ← {(⊑(0⊏𝕩)⊐<) ⊑ ((1⊏𝕩)∾⟨!∘0⟩)˜} ⍉ (2∾˜2÷˜≠)⊸⥊ ⟨