The Forced Resurrection of Tile Heap Fractal Dust
scheme@(guile-user)> (display ((lambda (rec xjoin extract index size spec chars n) ((lambda (xjoin index size) ((lambda (lincol) ((lambda (lines columns) ((lambda (symbol) (xjoin lines (lambda (k) (string-append (xjoin columns (lambda (j) (symbol k j)) "") "\n")) "")) (lambda (k j) (extract chars (index lines columns k j) 1)))) (car lincol) (cadr lincol))) (size n '(4 7)))) (lambda (n fun sep) (rec xjoin n fun sep "")) (lambda (rows cols k j) (rec index spec rows cols k j 0)) (lambda (n rowcol) (rec size n rowcol)))) (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 (base? fromspec cornerid) (lambda (self spec lines columns k j corners) (if (base? lines columns) (fromspec spec k j corners) ((lambda (l2 c2) (if (and (<= (- l2 2) k (- (* 2 l2) 3)) (<= (- c2 3) j (- (* 2 c2) 4))) (self self spec l2 c2 (- k l2 -2) (- j c2 -3) 5) ((lambda (up down left right) (if (and (or up down) (or left right)) ((lambda (corid) (self self spec l2 c2 (if up k (- k (* 2 l2) -4)) (if left j (- j (* 2 c2) -6)) (if (or (= corners 5) (= corners corid)) corid 0))) (cornerid up left)) 0)) (< k l2) (>= k (- (* 2 l2) 4)) (< j c2) (>= j (- (* 2 c2) 6))))) (quotient (+ lines 4) 3) (quotient (+ columns 6) 3))))) (lambda (lin col) (and (= lin 4) (= col 7))) (lambda (spec k j corners) ((lambda (cell) (if (pair? cell) (if (or (= corners 5) (= corners (car cell))) (cadr cell) (caddr cell)) cell)) (vector-ref spec (+ j (* 7 k))))) (lambda (up left) (if up (if left 1 2) (if left 3 4)))) (lambda (self n rowcol) (if (= n 0) rowcol (self self (- n 1) (list (- (* 3 (car rowcol)) 4) (- (* 3 (cadr rowcol)) 6))))) #(3 1 (1 8 1) 1 (2 8 1) 1 4 (1 9 2) 0 0 0 0 0 (2 10 2) (3 9 2) 0 0 0 0 0 (4 10 2) 5 1 (3 7 1) 1 (4 7 1) 1 6) " ─│┌┐└┘┬┴┤├" 2))
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ │ │ │ │ │ │ │
│ ┌─┴─┴─┐ │ │ ┌─┴─┴─┐ │
└───┤ ├───┘ └───┤ ├───┘
┌───┤ ├───┐ ┌───┤ ├───┐
│ └─┬─┬─┘ │ │ └─┬─┬─┘ │
│ │ │ ┌─┴───┐ ┌───┴─┐ │ │ │
└─────┘ └───┤ │ │ ├───┘ └─────┘
│ ┌─┴─┴─┐ │
└───┤ ├───┘
┌───┤ ├───┐
│ └─┬─┬─┘ │
┌─────┐ ┌───┤ │ │ ├───┐ ┌─────┐
│ │ │ └─┬───┘ └───┬─┘ │ │ │
│ ┌─┴─┴─┐ │ │ ┌─┴─┴─┐ │
└───┤ ├───┘ └───┤ ├───┘
┌───┤ ├───┐ ┌───┤ ├───┐
│ └─┬─┬─┘ │ │ └─┬─┬─┘ │
│ │ │ │ │ │ │ │
└─────┘ └─────┘ └─────┘ └─────┘
scheme@(guile-user)>