aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-04-25 15:13:03 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-04-25 15:13:03 -0400
commite084841be56412bc203ba335e12b613ecb552fff (patch)
tree22cfbe88c04bdd9c71eb7945520ac2ac730abca4 /src
parenta1c1dd6e1903032893a5f724b85c994c8a56b313 (diff)
Avoid using ¨ in CmpLen
Diffstat (limited to 'src')
-rw-r--r--src/r.bqn24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/r.bqn b/src/r.bqn
index 582da30a..b89f5161 100644
--- a/src/r.bqn
+++ b/src/r.bqn
@@ -43,13 +43,6 @@ _fold←{
}
´ ← _fold
-_qSearch ← {+´·×`𝕗(1-=)⌜<}
-_glyphLookup_ ← {
- {PrimInd𝕩} ⊑ ((𝕘⊑˜𝕗_qSearch)⌜glyphs)˙
-}
-_isGlyph ← { (glyphs _qSearch 𝕗) = {PrimInd𝕩} }
-IsJoin ← '∾'_isGlyph
-
∾ ← {k←≠𝕨⋄k⊸≤◶⟨⊑⟜𝕨⋄-⟜k⊑𝕩˜⟩⌜↕k+≠𝕩} # LIMITED to two list arguments
↓ ← {(𝕨⊸+⊑𝕩˙)⌜↕(≠𝕩)-𝕨} # LIMITED to number 𝕨 and list 𝕩
Cell ← ↓⟜≢
@@ -62,6 +55,13 @@ GetCells←(1==∘⊢)◶{
} _fillBy_ ⊢
⊏ ← GetCells # LIMITED to depth-1 natural number left argument
+_qSearch ← {+´·×`𝕗(1-=)⌜<}
+_glyphLookup_ ← {
+ {PrimInd𝕩} ⊑ ((𝕘⊑˜𝕗_qSearch)⌜glyphs)˙
+}
+_isGlyph ← { (glyphs _qSearch 𝕗) = {PrimInd𝕩} }
+IsJoin ← '∾'_isGlyph
+
_lookup_ ← {
s ← 2⊸×⌜↕(≠𝕘)÷2
(s⊏𝕘) _glyphLookup_ (((1⊸+⌜s)⊏𝕘)∾⟨𝕗⟩)
@@ -110,11 +110,11 @@ CmpLen ← {
SM←Cmp0 Pair ≥⊑Pair
c‿r←𝕨SM○≠𝕩
l←𝕨{
- i←0+´×`𝕨=¨𝕩
+ i←0+´×`𝕨=_eachd𝕩
m←1×´i↕⊸⊏𝕨
- {k‿l←SM´𝕩⋄c↩k⋄m×↩l}∘(⊑¨⟜𝕨‿𝕩)⍟(r⊸>)i
+ {k‿l←SM´𝕩⋄c↩k⋄m×↩l}∘(<⊑⌜𝕨‿𝕩˙)⍟(r⊸>)i
m
- }○((((-1⊸+)⌜↕r)+¨≠)⊸⊏)𝕩
+ }○{(𝕩⊑˜(¯1+≠𝕩)⊸-)⌜↕r}𝕩
⟨l,c⟩
}𝕩
}
@@ -230,7 +230,7 @@ _sort ← {(𝕗⊑⟨Cmp,Cmp˜⟩)_grade_𝕗 ⊸ ⊏}
FirstCell←{
"⊏𝕩: 𝕩 must have rank at least 1" ! 1≤=𝕩
"⊏𝕩: 𝕩 cannot have length 0" ! 0<≠𝕩
- (<0) GetCells 𝕩
+ (<0) ⊏ 𝕩
}
SelSub←{
"𝕨⊏𝕩: 𝕨 must be an array" ! IsArray 𝕨
@@ -254,7 +254,7 @@ _fillByPure_←{
𝕘 (3≤Type∘⊣)◶⟨{𝕨Fill𝕏},{(𝕨HomFil𝕩)_fillBy_𝕨}⍟(IsPure⊣)⟩ 𝕗
}
-¨ ↩ {𝕨𝔽⌜⊘(𝔽_eachd)_fillByPure_𝔽○ToArray𝕩}
+¨ ← {𝕨𝔽⌜⊘(𝔽_eachd)_fillByPure_𝔽○ToArray𝕩}
StructErr←{𝕩}
IsStructErr ← (3=Type)◶⟨0,StructErr˙⊸=⟩