[ prog / sol / mona ]

prog


The Forced Indentation Of Code

203 2022-10-15 11:20

Quadrant flower garden port of >>10.

scheme@(guile-user)> (display ((lambda (rec xjoin extract index quadreflect reduce rhombfun rhombout chars start band columnfactor n) ((lambda (xjoin reduce lines columns cycle) ((lambda (patch) ((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)))) (quadreflect (rhombfun reduce) rhombout))) (lambda (n fun sep) (rec xjoin n fun sep "")) (lambda (x y) (rec reduce start x y)) (+ (* 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 x (- -1 y) dx (- band dy) band))) (if (>= y 0) (output cycle 3 (quad (- -1 x) y (- band dx) dy band)) (output cycle 2 (quad (- -1 x) (- -1 y) (- band dx) (- band dy) band)))))) (lambda (self n x y) (if (<= (max x y) n) (>= (+ x y) n) (self self (+ (* 2 n) 2) x y))) (lambda (reduce) (lambda (x y dx dy band) (reduce x y))) (lambda (cycle quadindex fromquad) (if fromquad (+ quadindex 1) 0)) "🌵🌹🌺🌼🌸🌻🌷💮🦋" 2 6 1 10))
🌵🌹🌵🌸🌸🌸🌵🌸🌵🌸🌸🌸🌵🌸🌵🌸🌸🌸🌵🌹🌵
🌹🌵🌸🌸🌸🌸🌸🌵🌸🌸🌸🌸🌸🌵🌸🌸🌸🌸🌸🌵🌹
🌵🌻🌵🌸🌸🌸🌵🌹🌵🌸🌸🌸🌵🌹🌵🌸🌸🌸🌵🌼🌵
🌻🌻🌻🌵🌸🌵🌹🌹🌹🌵🌸🌵🌹🌹🌹🌵🌸🌵🌼🌼🌼
🌻🌻🌻🌻🌵🌹🌹🌹🌹🌹🌵🌹🌹🌹🌹🌹🌵🌼🌼🌼🌼
🌻🌻🌻🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌼🌼🌼
🌵🌻🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌼🌵
🌻🌵🌹🌹🌹🌹🌹🌵🌹🌹🌹🌹🌹🌵🌹🌹🌹🌹🌹🌵🌼
🌵🌻🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌼🌵
🌻🌻🌻🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌼🌼🌼
🌻🌻🌻🌻🌵🌹🌹🌹🌹🌹🌵🌹🌹🌹🌹🌹🌵🌼🌼🌼🌼
🌻🌻🌻🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌼🌼🌼
🌵🌻🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌼🌵
🌻🌵🌹🌹🌹🌹🌹🌵🌹🌹🌹🌹🌹🌵🌹🌹🌹🌹🌹🌵🌼
🌵🌻🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌼🌵
🌻🌻🌻🌵🌹🌵🌹🌹🌹🌵🌹🌵🌹🌹🌹🌵🌹🌵🌼🌼🌼
🌻🌻🌻🌻🌵🌹🌹🌹🌹🌹🌵🌹🌹🌹🌹🌹🌵🌼🌼🌼🌼
🌻🌻🌻🌵🌺🌵🌹🌹🌹🌵🌺🌵🌹🌹🌹🌵🌺🌵🌼🌼🌼
🌵🌻🌵🌺🌺🌺🌵🌹🌵🌺🌺🌺🌵🌹🌵🌺🌺🌺🌵🌼🌵
🌹🌵🌺🌺🌺🌺🌺🌵🌺🌺🌺🌺🌺🌵🌺🌺🌺🌺🌺🌵🌹
🌵🌹🌵🌺🌺🌺🌵🌺🌵🌺🌺🌺🌵🌺🌵🌺🌺🌺🌵🌹🌵
scheme@(guile-user)> 

larger version: https://wirechan.org/b/res/2162.html#4154 http://paste.textboard.org/bedf4f11/raw

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

267


VIP:

do not edit these