fractal tiling with a 1x2 seed rectangle and an expansion pattern of [[A B B D] [A C C D]]
scheme@(guile-user)> (display ((lambda (rec xjoin index symbol size chars start level) ((lambda (xjoin lines columns) ((lambda (index) ((lambda (symbol) (xjoin lines (lambda (k) (string-append (xjoin columns (lambda (j) (symbol k j)) "") "\n")) "")) (lambda (k j) (symbol chars (index k j))))) (lambda (k j) (rec index k j lines columns start)))) (lambda (n fun sep) (rec xjoin n fun sep "")) (size level start #t) (size level start #f))) (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 (self k j lin col hv) (if hv (if (= lin 1) `(#t ,j) ((lambda (c4) ((lambda (jd jm) (if (or (= jd 0) (= jd 3)) (self self k jm lin c4 #f) ((lambda (l2) (self self (modulo k l2) (- j c4) l2 (ash c4 1) #t)) (ash lin -1)))) (quotient j c4) (modulo j c4))) (ash col -2))) (if (= col 1) `(#f ,k) ((lambda (l4) ((lambda (kd km) (if (or (= kd 0) (= kd 3)) (self self km j l4 col #t) ((lambda (c2) (self self (- k l4) (modulo j c2) (ash l4 1) c2 #f)) (ash col -1)))) (quotient k l4) (modulo k l4))) (ash lin -2))))) (lambda (chars index) (vector-ref chars (+ (if (car index) 0 2) (cadr index)))) (lambda (level horver lincol) (ash (if (eq? horver lincol) 1 2) level)) #("⋐≣" "≣⋑" "╭╮" "╰╯") #t 4))
separate output for 413