Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#lang racket
(define (carpet n)
(if (zero? n)
'("#")
(let* ([prev (carpet (sub1 n))]
[spaces (regexp-replace* #rx"#" (car prev) " ")])
(append (map (λ(x) (~a x x x)) prev)
(map (λ(x) (~a x spaces x)) prev)
(map (λ(x) (~a x x x)) prev)))))
(for-each displayln (carpet 3))