rectangularity

master
Matthew Butterick 5 years ago
parent d7050675b9
commit 4484aa863a

@ -5,7 +5,7 @@
(for*/list ([(row ridx) (in-indexed (string-split str))] (for*/list ([(row ridx) (in-indexed (string-split str))]
[(col cidx) (in-indexed row)] [(col cidx) (in-indexed row)]
#:when (char=? #\# col)) #:when (char=? #\# col))
(+ cidx (* +i ridx)))) (make-rectangular cidx ridx)))
(define ((count-visible roids) roid-origin) (define ((count-visible roids) roid-origin)
(length (remove-duplicates (for/list ([roid (in-list roids)] (length (remove-duplicates (for/list ([roid (in-list roids)]