diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-18 17:21:34 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-18 17:21:34 -0400 |
| commit | f5de03c52112b10058fcb873e997408bfb074cb2 (patch) | |
| tree | 98a3cbc8034df3f943c9682ea4e3889ec92fd748 | |
| parent | 4c6f523d630024f3538a3c04c80ab27fa4e7d847 (diff) | |
Replace lookup table with boolean or
| -rw-r--r-- | src/eu.bqn | 22 |
1 files changed, 2 insertions, 20 deletions
@@ -48,31 +48,13 @@ Explain ← { p←¯1×sx>ex (xs∾⌜(¯1⊑ys))∾(p⊑xs)∾⌜ys } - Draw←{𝕊g: g×+˝(2⋆↕4)×>{𝕏g}¨⟨«,«˘,»,»˘⟩} + Draw←{𝕊g: {g∧𝕏g}¨⟨«,«˘,»,»˘⟩} T←{t‿x 𝕊 s: p←x-⌊(2÷˜≠t) ⋄ ∾(p↑s)‿t‿(s↓˜p+≠t) } repr←" ╷╶┌╵│└├╴┐─┬┘┤┴┼" - repri←⥊[ - 0‿1‿2‿3‿4‿5‿6‿7‿8‿9‿10‿11‿12‿13‿14‿15 - 1‿1‿3‿3‿5‿5‿7‿7‿9‿9‿11‿11‿13‿13‿15‿15 - 2‿3‿2‿3‿6‿7‿6‿7‿10‿11‿10‿11‿14‿15‿14‿15 - 3‿3‿3‿3‿7‿7‿7‿7‿11‿11‿11‿11‿15‿15‿15‿15 - 4‿5‿6‿7‿4‿5‿6‿7‿12‿13‿14‿15‿12‿13‿14‿15 - 5‿5‿7‿7‿7‿5‿7‿7‿13‿13‿15‿15‿13‿13‿15‿15 - 6‿7‿6‿7‿6‿7‿6‿7‿14‿15‿14‿15‿14‿15‿14‿15 - 7‿7‿7‿7‿7‿7‿7‿7‿15‿15‿15‿15‿15‿15‿15‿15 - 8‿9‿10‿11‿12‿13‿14‿15‿8‿9‿10‿11‿12‿13‿14‿15 - 9‿9‿11‿11‿13‿13‿15‿15‿9‿9‿11‿11‿13‿13‿15‿15 - 10‿11‿10‿11‿14‿15‿14‿15‿10‿11‿10‿11‿14‿15‿14‿15 - 11‿11‿11‿11‿15‿15‿15‿15‿11‿11‿11‿11‿15‿15‿15‿15 - 12‿13‿14‿15‿12‿13‿14‿15‿12‿13‿14‿15‿12‿13‿14‿15 - 13‿13‿15‿15‿13‿13‿15‿15‿13‿13‿15‿15‿13‿13‿15‿15 - 14‿15‿14‿15‿14‿15‿14‿15‿14‿15‿14‿15‿14‿15‿14‿15 - 15‿15‿15‿15‿15‿15‿15‿15‿15‿15‿15‿15‿15‿15‿15‿15 - ] tp←⌽⚇1 ⌈ii (1‿0+wh×≍)¨ (k/p)⊏d paths←⌽⚇1 Path¨<˘pd graphs←{1¨⌾(𝕩⊸⊑) 0⥊˜1+⌽dim}¨paths - out←1↓⊏⟜repr{⊑⟜repri¨(𝕨×≠repr)+𝕩}´Draw¨graphs + out←1↓repr⊏˜ +⟜(2⊸×)´ ∨´Draw¨graphs {y‿x𝕊ti: out (ti⊑toks)‿x⊸T⌾(y⊸⊏)↩}´˘⍉tp≍ti # place tokens out =⟜'╷'◶⊢‿'│'¨⌾⊏↩ # fix first row to look better <˘∾(∾" "‿src‿" ")‿out |
