diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-19 19:56:20 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-19 19:56:20 -0500 |
| commit | bdc89692d3dd7675d08f706fc2bedcf903975ed5 (patch) | |
| tree | 3c27d6a780536823e2119b1e1a558055d0523ecc /src | |
| parent | 610f7013ef1ec53938c81fd4eef05b7e594f893f (diff) | |
Rename GetFill to Fill
Diffstat (limited to 'src')
| -rwxr-xr-x | src/pr.bqn | 2 | ||||
| -rw-r--r-- | src/r.bqn | 16 |
2 files changed, 9 insertions, 9 deletions
@@ -24,7 +24,7 @@ Inc ← { } # Required functionality passed in as an argument -def ← ⟨"Type","Decompose","Glyph","GetFill","Log","GroupLen","GroupOrd"⟩ +def ← ⟨"Type","Decompose","Glyph","Fill","Log","GroupLen","GroupOrd"⟩ keep ← "!+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘" len ⇐ def+○≠keep ki ← chr⊐keep @@ -1,5 +1,5 @@ # BQN runtime. Requires: -# Type Decompose Glyph GetFill Log GroupLen GroupOrd !+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘ +# Type Decompose Glyph Fill Log GroupLen GroupOrd !+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘ Glyph ◶ ← {𝕨((𝕨𝔽𝕩)⊑𝕘){𝔽}𝕩} # LIMITED to number left operand result @@ -161,7 +161,7 @@ SelSub←{ "𝕨⊏𝕩: Indices out of range" ! 1×´⥊ ((-l)⊸≤×l⊸>)⌜ 𝕨 𝕨 (⊢+l×0>⊢)⌜⊸⊏ 𝕩 } -First ← (0<≠)◶⟨GetFill,0⊸⊑⟩ Deshape +First ← (0<≠)◶⟨Fill,0⊸⊑⟩ Deshape ¨ ↩ {𝕨(𝔽⌜)⊘(𝔽_eachd)○ToArray𝕩} @@ -318,13 +318,13 @@ _takeDrop←{ s ← r {(1⌜∘↕𝕨-≠𝕩)∾𝕩}⍟(>⟜≠) ≢𝕩 _c ← { (×⟜𝕗⌜𝕨) +⌜ 𝕩 } i←<0 ⋄ k←1 ⋄ UIk←{ i (k×𝕨)_c↩ k ↕⊸(𝕨_c)⍟(1-=⟜1) 𝕩 ⋄ k↩1 ⋄ ≠𝕩 } - fill←0 - sh ← (⊑⟜s Noop◶{k×↩𝕨⋄𝕨}‿(⊣ UIk {fill↩1}_inds) ⊑⟜𝕨)⌜ ↕r + doFil←0 + sh ← (⊑⟜s Noop◶{k×↩𝕨⋄𝕨}‿(⊣ UIk {doFil↩1}_inds) ⊑⟜𝕨)⌜ ↕r (0<=i)◶(s⊸⥊)‿{ sh ∾↩ t ← (s⊑˜r⊸+)⌜↕(≠s)-r {i 𝕩_c↩ ↕𝕩}⍟(1-1⊸=) k×´t Sel ← ⊑⟜(⥊𝕩) - {Sel↩0⊸≤◶⟨(GetFill𝕩)˙,Sel⟩}⍟⊢fill + {Sel↩0⊸≤◶⟨(Fill𝕩)˙,Sel⟩}⍟⊢doFil Sel⌜ sh ⥊ i } ToArray 𝕩 } @@ -355,7 +355,7 @@ ShiftAfter←{ } FC←{ # Fill cell "« or »: 𝕩 must have rank at least 1" ! 1≤=𝕩 - (GetFill 𝕩)⌜ ⥊⟜(↕1×´⊢) 1 Cell 𝕩 + (Fill 𝕩)⌜ ⥊⟜(↕1×´⊢) 1 Cell 𝕩 } Windows←{ @@ -432,10 +432,10 @@ Reshape←{ Chk ← ⊢ ⊣ "𝕨⥊𝕩: Shape must be exact when reshaping with ∘" ! ⌊⊸= a←(2⌊t)◶⟨Chk,⌊,⌈⟩n÷lp s↩p⊣◶⊢‿a¨s - {d∾↩(GetFill d)⌜↕𝕩-n⋄n}⍟(n⊸<)⍟(3=t)lp×a + {d∾↩(Fill d)⌜↕𝕩-n⋄n}⍟(n⊸<)⍟(3=t)lp×a } s s⥊{ - 𝕩(0<n)◶⟨GetFill⊸(⊣⌜)⋄{⊑⟜d⌜n|𝕩}⟩↕l + 𝕩(0<n)◶⟨Fill⊸(⊣⌜)⋄{⊑⟜d⌜n|𝕩}⟩↕l }⍟(l≠n)d } ⥊ ↩ Deshape ⊘ ⥊ |
