diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-08-13 13:26:57 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-08-13 13:26:57 -0400 |
| commit | 28573f0dbc2338a2a7f29de0f8a9a9d531d6d29a (patch) | |
| tree | 2049f31715520247700f848f9f1818d4fe5e9b7a /src/pr.bqn | |
| parent | 047bff85dd5094725b0898d8bdd5b8c32e5d766d (diff) | |
Pass VM-provided functionality through the objects array, not a function argument
Diffstat (limited to 'src/pr.bqn')
| -rwxr-xr-x | src/pr.bqn | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -24,11 +24,15 @@ Inc ← { } # Required functionality passed in as an argument -pnam ← ⟨"IsArray","Type","Log","GroupLen","GroupOrd"⟩∾names⊏˜chr⊐"!+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘" +def ← ⟨"IsArray","Type","Log","GroupLen","GroupOrd"⟩ +keep ← "!+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘" +ki ← chr⊐keep +kt ← (+`nc)(∾((≠def)∾¯1↓⊣)+⊔⟜⊒∘⍋)ki +names ↩ (⥊¨kt⊏chr)⌾(ki⊸⊏)names E_isdef ← (3≤≠)◶⟨0,∧´⟨chr," ","←↩"⟩∊˜¨3⊸↑⟩ -E_proc ← { +E_proc ← ({𝕨∘𝕩}´ {𝕨•_R_𝕩}⟜⥊¨⟜(≠↑chr˜) def)∘{ l←≠chr q←≠`𝕩∊"""'" ⋄ f←¬∨`q¬⊸∧𝕩='#' ∾ (((l×f/q)+chr⊸⊐) (≥⟜l)◶⟨⊑⟜names,⥊∘⊢⟩¨ ⊢) f/𝕩 @@ -39,9 +43,5 @@ E_redef ← { # handles [fmd] [←↩] (E_proc 1↑𝕩) ∾ "←" ∾ tail } -ref ← ∾ ∾⟜(•UCS 10)¨ ∾⟨ - ⟨"{"⟩ - ⟨"←𝕩"∾˜"⟨"∾"⟩"∾˜1↓∾","⊸∾¨pnam⟩ - E_isdef◶E_proc‿E_redef¨ impl∾<"⟨"∾"⟩"∾˜1↓⥊","⊸∾˘∾chrs - ⟨"}"⟩ -⟩ +ref ← ∾∾⟜(•UCS 10)¨ E_isdef◶E_proc‿E_redef¨ impl∾<"⟨"∾"⟩"∾˜1↓⥊","⊸∾˘chr +⟨ref, def+○≠keep⟩ |
