[ prog / sol / mona ]

prog


The Forced Indentation Of Code

85 2022-05-07 10:38

upgrade of >>14 with a coordinate painter

>> console.log (((self, xjoin, vec, fore, back, band, n, s, cells) => (expand => (cells => (symbol => self (xjoin) (2 * n - 1, "\n", k => self (xjoin) (2 * n - 1, "", j => symbol (k, j)))) ((k, j) => fore (n, band, s, k, j) ?? back (n, band, cells, k, j))) (expand (cells, s.length))) ((chars, n) => (a => self (vec) (a.length - 1, a, s => self (xjoin) (n, "", k => s))) ([...chars]))) (f => (...args) => f (f) (...args), me => (n, s, f) => n <= 0 ? "" : n == 1 ? f (0) : me (me) (n - 1, s, f) + s + f (n - 1), (push => me => (n, vec, f) => n == 0 ? [f (vec [0])] : push (me (me) (n - 1, vec, f), f (vec [n]))) ((a, x) => (dis => a) (a.push (x))), (abs => (n, band, s, k, j) => ((k, j) => (k + j) % band == 0 ? s : null) (abs (n - 1 - k), abs (n - 1 - j))) (Math.abs), ((abs, path, div) => (n, band, cells, k, j) => ((k, j) => (ring => (path => cells [(div (cells.length * path, 4 * ring) + div (ring, band)) % cells.length]) (path (ring, k, j))) (abs (k) + abs (j))) (n - 1 - k, j - n + 1)) (Math.abs, (ring, k, j) => (k >= 0) && (j > 0) ? k : (k > 0) && (j <= 0) ? ring - j : (k <= 0) && (j < 0) ? 2 * ring - k : 3 * ring + j, (a, b) => (a - a % b) / b), 3, 10, "rho", "█▓▒░ "))
rho▓▓▓▓▓▓rho██████rho      rho      rho      rho██████rho
▓▓▓▓▓▓rho██████rho      rho░░░rho   ░░░rho      rho██████
▓▓▓rho██████rho      rho░░░░░░░░░rho░░░░░░rho      rho███
rho██████rho      rho░░░░░░rho░░░▒▒▒rho░░░░░░rho      rho
▓▓▓▓▓▓rho      rho░░░░░░rho▒▒▒rho▒▒▒▒▒▒rho░░░░░░rho      
▓▓▓rho██████rho░░░░░░rho▒▒▒▒▒▒▒▒▒rho▒▒▒▒▒▒rho░░░░░░rho   
rho██████rho   ░░░rho▒▒▒▒▒▒rho▓▓▓▓▓▓rho▒▒▒▒▒▒rho░░░░░░rho
██████rho      rho░░░▒▒▒rho▓▓▓rho▓▓▓▓▓▓rho▒▒▒▒▒▒rho░░░░░░
███rho      rho░░░░░░rho▓▓▓▓▓▓███rho▓▓▓▓▓▓rho▒▒▒▒▒▒rho░░░
rho      rho░░░░░░rho▒▒▒▒▒▒rho██████rho▓▓▓▓▓▓rho▒▒▒▒▒▒rho
███rho      rho░░░░░░rho░░░░░░   rho██████rho▓▓▓▓▓▓rho▒▒▒
██████rho      rho      rho░░░rho██████rho▓▓▓▓▓▓rho▒▒▒▒▒▒
rho██████rho   ███rho      rho██████rho▓▓▓▓▓▓rho▒▒▒▒▒▒rho
▓▓▓rho███▓▓▓rho██████rho      ███rho▓▓▓▓▓▓rho▒▒▒▒▒▒rho░░░
▓▓▓▓▓▓rho▓▓▓▓▓▓rho██████rho   rho▓▓▓▓▓▓rho▒▒▒▒▒▒rho░░░░░░
rho▒▒▒▒▒▒rho▓▓▓▓▓▓rho██████rho███▓▓▓rho▒▒▒▒▒▒rho░░░░░░rho
░░░rho▒▒▒▒▒▒rho▓▓▓▓▓▓rho█████████rho▒▒▒▒▒▒rho░░░░░░rho   
░░░░░░rho▒▒▒▒▒▒rho▓▓▓▓▓▓rho███rho▒▒▒▒▒▒rho░░░░░░rho      
rho░░░░░░rho▒▒▒▒▒▒rho▓▓▓▓▓▓rho▓▓▓▓▓▓rho░░░░░░rho      rho
<- undefined
>> 

larger version with colors and wider bands: http://paste.textboard.org/9f796569/raw

267


VIP:

do not edit these