Last active
November 14, 2016 05:54
-
-
Save jab/45b9a4c5e47ff8448064562a2f69dd70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang slideshow | |
(define (empty-square color [sidelen 70]) | |
(let ([sq (filled-rectangle sidelen sidelen)]) | |
(colorize sq color))) | |
(let ([colors #("black" "red")]) | |
(for/fold ([rows (blank)]) ([r 8]) | |
(vc-append rows (for/fold ([row (blank)]) ([c 8]) | |
(let* ([idx (remainder (+ c r) 2)] | |
[clr (vector-ref colors idx)] | |
[sq (empty-square clr)]) | |
(hc-append row sq)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment