[ prog / sol / mona ]

prog


The Forced Indentation Of Code

198 2022-10-06 11:32

Quadrant windmill >>25 >>65 flower garden:

scheme@(guile-user)> (display ((lambda (rec xjoin extract index quadrotate windmill windout chars band columnfactor n) ((lambda (xjoin patch lines columns cycle) ((lambda (symbol) (xjoin lines (lambda (k) (string-append (xjoin columns (lambda (j) (symbol k j)) "") "\n")) "")) (lambda (k j) (extract chars (index patch band cycle columnfactor n k j) 1)))) (lambda (n fun sep) (rec xjoin n fun sep "")) (quadrotate windmill windout) (+ (* 2 n) 1) (+ (* 2 columnfactor n) 1) (string-length chars))) (lambda (f . args) (apply f (cons f args))) (lambda (self n fun sep acc) (if (<= n 0) "" (if (= n 1) (string-append (fun 0) acc) (self self (- n 1) fun sep (string-append sep (fun (- n 1)) acc))))) (lambda (str pos len) (substring str pos (+ pos len))) (lambda (patch band cycle columnfactor n k j) ((lambda (k j) ((lambda (dx dy) (if (or (= dx 0) (= dy 0)) 0 (+ (patch (- cycle 1) (quotient (- (+ k j) dx) band) (quotient (- (- k j) dy) band) dx dy band) 1))) (modulo (+ k j) band) (modulo (- k j) band))) (- k n) (- j (* columnfactor n)))) (lambda (quad output) (lambda (cycle x y dx dy band) (if (>= x 0) (if (>= y 0) (output cycle 0 (quad x y dx dy band)) (output cycle 1 (quad (- -1 y) x (- band dy) dx band))) (if (>= y 0) (output cycle 3 (quad y (- -1 x) dy (- band dx) band)) (output cycle 2 (quad (- -1 x) (- -1 y) (- band dx) (- band dy) band)))))) (lambda (x y dx dy band) (>= x y)) (lambda (cycle quadindex fromquad) (if fromquad (+ quadindex 1) 0)) "🌵🌹🌺🌼🌸🌻🌷💮🦋" 6 2 9))

separate output >>197 for renewed 413 >>127

larger version: https://wirechan.org/b/res/2162.html#4099 http://paste.textboard.org/7c3d3d3f/raw

apply
* { line-height: 1em; }
to the larger version for more symmetry

267


VIP:

do not edit these