[ prog / sol / mona ]

prog


The Forced Indentation Of Code

65 2022-04-01 10:31

upgrade of >>25 with a coordinate painting function

scheme@(guile-user)> (display ((lambda (rec xjoin index symbol band E cell chars separ n) ((lambda (xjoin cycle) ((lambda (E chars) ((lambda (symbol) (xjoin (* 2 n) (lambda (k) (string-append (xjoin (* 2 n) (lambda (j) (symbol k j)) separ) "\n")) "")) (lambda (k j) (symbol E chars cell cycle band (index n k j))))) (xjoin cell (lambda (x) E) "") (xjoin (* cell cycle) (lambda (x) ((lambda (idx) (substring chars idx (+ idx 1))) (quotient x cell))) ""))) (lambda (n fun sep) (rec xjoin n fun sep "")) (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 (split) (lambda (n k j) (apply (lambda (k up j left) (if ((if (eq? up left) >= <=) k j) (+ k j) -1)) `(,@(split n k) ,@(split n j))))) (lambda (n x) (if (< x n) `(,(- n 1 x) #t) `(,(- x n) #f)))) (lambda (E chars cell cycle band index) (if (< index 0) E ((lambda (idx) (substring chars idx (+ idx cell))) (* cell (modulo (quotient index band) cycle))))) 1 " " 2 "█▓▒░▒▓" "" 11))
▒▒▓▓██▓▓▒▒░░▒▒▓▓██▓▓▒▒                    ▒▒
  ██▓▓▒▒░░▒▒▓▓██▓▓▒▒░░                  ██▓▓
    ▒▒░░▒▒▓▓██▓▓▒▒░░▒▒                ▒▒▓▓██
      ▒▒▓▓██▓▓▒▒░░▒▒▓▓              ▒▒░░▒▒▓▓
        ██▓▓▒▒░░▒▒▓▓██            ██▓▓▒▒░░▒▒
          ▒▒░░▒▒▓▓██▓▓          ▒▒▓▓██▓▓▒▒░░
            ▒▒▓▓██▓▓▒▒        ▒▒░░▒▒▓▓██▓▓▒▒
              ██▓▓▒▒░░      ██▓▓▒▒░░▒▒▓▓██▓▓
                ▒▒░░▒▒    ▒▒▓▓██▓▓▒▒░░▒▒▓▓██
                  ▒▒▓▓  ▒▒░░▒▒▓▓██▓▓▒▒░░▒▒▓▓
                    ████▓▓▒▒░░▒▒▓▓██▓▓▒▒░░▒▒
▒▒░░▒▒▓▓██▓▓▒▒░░▒▒▓▓████                    
▓▓▒▒░░▒▒▓▓██▓▓▒▒░░▒▒  ▓▓▒▒                  
██▓▓▒▒░░▒▒▓▓██▓▓▒▒    ▒▒░░▒▒                
▓▓██▓▓▒▒░░▒▒▓▓██      ░░▒▒▓▓██              
▒▒▓▓██▓▓▒▒░░▒▒        ▒▒▓▓██▓▓▒▒            
░░▒▒▓▓██▓▓▒▒          ▓▓██▓▓▒▒░░▒▒          
▒▒░░▒▒▓▓██            ██▓▓▒▒░░▒▒▓▓██        
▓▓▒▒░░▒▒              ▓▓▒▒░░▒▒▓▓██▓▓▒▒      
██▓▓▒▒                ▒▒░░▒▒▓▓██▓▓▒▒░░▒▒    
▓▓██                  ░░▒▒▓▓██▓▓▒▒░░▒▒▓▓██  
▒▒                    ▒▒▓▓██▓▓▒▒░░▒▒▓▓██▓▓▒▒
scheme@(guile-user)> 

larger version with colors and wider bands: http://paste.textboard.org/0956d33d/raw

267


VIP:

do not edit these