aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-02-17 13:21:30 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-02-17 13:21:30 -0500
commit093d9e22e058bc516020d64ae23c42833e35d1ae (patch)
treed53d743b4757839241d030df836f3e335aa1b1b0 /spec
parent1a83b6105b0d808b0b20f657b812c564c16bb5ec (diff)
Avoid circular definitions in reference implementations
Diffstat (limited to 'spec')
-rw-r--r--spec/reference.bqn8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/reference.bqn b/spec/reference.bqn
index adad4f13..ad6bf923 100644
--- a/spec/reference.bqn
+++ b/spec/reference.bqn
@@ -56,7 +56,7 @@ Fill # Enclosed fill value for 𝕩
≢ ↩ IsArray◶⟨⟩‿≢ # LIMITED to monadic case
# LIMITED to numeric arguments for arithmetic cases
-√ ← 2⊸√ ⊘ (⋆⟜÷˜)
+√ ← ⋆⟜(÷2) ⊘ (⋆⟜÷˜)
∧ ← ×
∨ ← (+-×)
¬ ← 1+-
@@ -356,9 +356,9 @@ Replicate ← {0<=𝕨}◶(⥊˜⟜≠Rep⊢)‿{!𝕨=○≠𝕩⋄𝕨Rep𝕩}
∾ ↩ Join ⊘ JoinTo
⊔ ← GroupInds ⊘ Group
⍉ ← Transpose ⊘ ReorderAxes
-⊐ ← ⍷⊸⊐ ⊘ IndexOf
-∊ ← MarkFirst ⊘ (⊐˜<≠∘⊢)
+∊ ← MarkFirst ⊘ (IndexOf˜<≠∘⊢)
⍷ ← ∊⊸/ ⊘ Find
+⊐ ← ⍷⊸IndexOf ⊘ IndexOf
⍋ ← Cmp _grade ⊘ ( Cmp _bins)
⍒ ← -∘Cmp _grade ⊘ (-∘Cmp _bins)
∧ ↩ ⍋⊸⊏ ⊘ ∧
@@ -431,7 +431,7 @@ ReorderAxes←{
Transpose←(0<=)◶⟨ToArray,(=-1˙)⊸ReorderAxes⟩
# Sorting
-Cmp ← ∨○IsArray◶{ # No arrays
+Cmp ← ⌈○IsArray◶{ # No arrays
𝕨(>-<)𝕩 # Assume they're numbers
}‿{ # At least one array
e←𝕨-˜○(∨´0=≢)𝕩