[ prog / sol / mona ]

prog


The Forced Indentation Of Code

53 2022-03-12 11:38

upgrade of the Sierpinski carpet >>17 with the custom >>21 Y combinator and a coordinate painting function

>>> print ((lambda mY, xjoin, size, pred, symbol, index, n, cell, E, chars: (lambda n, cycle, xjoin, pred: (lambda E, chars: (lambda symbol: xjoin (n, lambda k: xjoin (n, lambda j: symbol (k, j), ''), '\n')) (lambda k, j: symbol (index (k, j), cell, cycle, chars) if pred (k, j) else E)) (xjoin (cell, lambda x: E, ''), xjoin (cell * cycle, lambda x: chars [x // cell], ''))) (size (n), len (chars), mY (xjoin), mY (pred))) (lambda f, *more: (lambda x: x (x)) (lambda y: f (lambda *args: y (y) (*args), *more)), lambda f: lambda n, g, s: '' if n <= 0 else g (0) if n == 1 else f (n - 1, g, s) + s + g (n - 1), lambda n: 3 ** n, lambda f: lambda k, j: ((k == 0) or (j == 0)) or (not ((k % 3 == 1) and (j % 3 == 1)) and f (k // 3, j // 3)), lambda idx, cell, cycle, chars: (lambda idx: chars [idx : idx + cell]) (idx % cycle * cell), lambda k, j: k + j, 3, 2, " ", "█▓▒░▒▓"))

the output takes the post over the 413 Request Entity Too Large limit so it goes up separately

larger version with colors: http://paste.textboard.org/904316a1/raw

credit for the pattern: https://leftychan.net/meta/res/979.html#10617

267


VIP:

do not edit these