aboutsummaryrefslogtreecommitdiff
path: root/impl.bqn
diff options
context:
space:
mode:
Diffstat (limited to 'impl.bqn')
-rw-r--r--impl.bqn14
1 files changed, 14 insertions, 0 deletions
diff --git a/impl.bqn b/impl.bqn
index 026c03f3..558ef06b 100644
--- a/impl.bqn
+++ b/impl.bqn
@@ -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