aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-04 20:30:36 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-04 20:30:36 -0400
commitba034c4564de0f8ee6f43a504bbad96900d23e68 (patch)
treea3e633a23227c18166a0ebf691e3cfac6e527d99
parent261bc816ea1635051bc367097c3952058543a4f5 (diff)
More obvious implementation of First
-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÷˜≠)⊸⥊ ⟨