[ prog / sol / mona ]

prog


The Forced Indentation Of Code

262 2023-06-22 12:45
(lambda (spec expandx expandy) (lambda (self var x y sizex sizey) (if (= sizex 1) var ((lambda (subx suby) ((lambda (qx mx qy my) (self self (vector-ref (vector-ref spec var) (+ (* qy expandx) qx)) mx my subx suby)) (quotient x subx) (modulo x subx) (quotient y suby) (modulo y suby))) (quotient sizex expandx) (quotient sizey expandy))))) ((lambda (size) (lambda (cellx celly expandx expandy levels) (list (size cellx expandx levels) (size celly expandy levels)))) (lambda (start expand levels) (* start (expt expand levels)))) (lambda (spec columns) (lambda (index dx dy) (vector-ref (vector-ref spec index) (+ (* dy columns) dx)))) (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 (spec band) ((lambda (b2 on) (lambda (index dx dy) (if (zero? index) #f ((lambda (bits) (or (and (= dy b2) (or (= dx b2) (on 0 bits) (and (< dx b2) (on 1 bits)) (and (> dx b2) (on 2 bits)))) (and (= dx b2) (or (on 3 bits) (and (< dy b2) (on 4 bits)) (and (> dy b2) (on 5 bits)))) (and (= dx dy) (or (on 6 bits) (and (< dx b2) (on 7 bits)) (and (> dx b2) (on 8 bits)))) (and (= (+ dx dy) band) (or (on 9 bits) (and (< dx b2) (on 10 bits)) (and (> dx b2) (on 11 bits)))))) (vector-ref spec index))))) (quotient band 2) logbit?)) #(#f 1 8 36 34 20 18 33 17 10 12 64 512 132 1028 2050 258 160 2080 1040 272 2304 1152 1280 2176) '(((#t 1 4) (#f 5) (#t 1 6) (#f 3)) ((#t 5 2) (#t 6 2) (#f 4) (#f 3)) ((#f 6) (#t 1 3) (#f 4) (#t 1 5)) ((#f 6) (#f 5) (#t 3 2) (#t 4 2))) 2 2 '(((#t 8 9) (#f 14) (#t 0 1) (#f 13)) ((#t 14 15) (#t 6 7) (#f 9) (#f 10)) ((#f 6) (#t 8 10) (#f 5) (#t 0 2)) ((#f 1) (#f 2) (#t 13 15) (#t 5 7))) 2 2 1 8 "🌵🌹🌺🌼🌸🌻🌷💮🦋" 6 1 10))
267


VIP:

do not edit these