diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-31 13:23:54 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-31 13:24:48 -0400 |
| commit | e4634b49f32a8040eb1113f7c5f470aec20d8bb6 (patch) | |
| tree | 770bbf213d4aeba8dae998343b2523282c833b1a /impl.bqn | |
| parent | 1a15fa1cb984dd1d6bd3f5c5b56e0169b1085edf (diff) | |
Lookup-based ⁼ implementation
Diffstat (limited to 'impl.bqn')
| -rw-r--r-- | impl.bqn | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -392,6 +392,20 @@ OccurrenceCount ← ⊐˜(⊢-⊏)⍋∘⍋ ProgressiveIndexOf ← {𝕨⊐○(≍˘⟜OccurrenceCount𝕨⊸⊐)𝕩} ⊒ ← OccurrenceCount⊘ ProgressiveIndexOf +inverse ← {(⊑(0⊏𝕩)⊐<) ⊑ ((1⊏𝕩)∾⟨!∘0⟩)˜} ⍉ (2∾˜2÷˜≠)⊸⥊ ⟨ + +, +⊘(-˜) + -, - + ×, ⊢⊘(÷˜) + ÷, ÷ + ⋆, Log + √, ⋆⟜2⊘(⋆˜) + ∧, ⊢⊘(÷˜) + ∨, ⊢⊘(-˜÷1-⊢) + <, {!IsArray𝕩⋄!0==𝕩⋄⊑𝕩}⊘(!∘0) + /, {!(⍋≡↕∘≠)𝕩⋄≠¨⊔𝕩}⊘(!∘0) +⟩ +⁼ ← {Inverse 𝕗} + _repeat_←{ n←𝕨𝔾𝕩 l←u←0 |
