diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-20 14:37:53 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-20 14:40:23 -0500 |
| commit | bf89575eb73e4c06eea61bfa92521c4507341f62 (patch) | |
| tree | 2ccdd638f7afbc6b97e5a3925a70ea373a766d71 /src/pr.bqn | |
| parent | 55ce1825ebc76493316063ea8b0f7e1c0aa95677 (diff) | |
Add _fillBy_ primitive and finish structural function fill support
Diffstat (limited to 'src/pr.bqn')
| -rwxr-xr-x | src/pr.bqn | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -24,16 +24,17 @@ Inc ← { } # Required functionality passed in as an argument -def ← ⟨"Type","Decompose","Glyph","Fill","Log","GroupLen","GroupOrd"⟩ +def ← ⟨"Type","Decompose","Glyph","Fill","Log","GroupLen","GroupOrd","_fillBy_"⟩ keep ← "!+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘" len ⇐ def+○≠keep ki ← chr⊐keep -kt ← (+`nc)(∾(def≠⊸»⊣)+⊔⟜⊒∘⍋)ki +dt ← ⊔⟜⊒ (+´·∧`'_'=0‿¯1⊸⊏)¨ def +ns ← » ne←+`nc +kt ← ∾ (ns+≠¨dt) + ⊔⟜⊒ne⍋ki names ↩ (⥊¨kt⊏chr)⌾(ki⊸⊏)names - E_isdef ← (3≤≠)◶⟨0,∧´⟨chr," ","←↩"⟩∊˜¨3⊸↑⟩ -E_proc ← ({𝕨∘𝕩}´ {𝕨•_R_𝕩}⟜⥊¨⟜(≠↑chr˜) def)∘{ +E_proc ← ({𝕨∘𝕩}´ def {𝕨•_R_𝕩}⟜⥊¨ chr⊏˜∾ns+dt)∘{ l←≠chr q←≠`𝕩='"' ⋄ q∨↩≠`q<𝕩=''' ⋄ f←¬∨`q<𝕩='#' ∾ (((l×f/q)+chr⊸⊐) (≥⟜l)◶⟨⊑⟜names,⥊∘⊢⟩¨ ⊢) f/𝕩 |
