Cleaner and more efficient print

This commit is contained in:
Vivianne 2023-07-03 01:26:29 -07:00
parent da663511f7
commit ddcbaa6c35
1 changed files with 2 additions and 5 deletions

View File

@ -51,13 +51,10 @@
(array-set! board val y x)))
(define (board-display board)
(define (print m) (or m " "))
;; this is .. probably messy?
(array-slice-for-each-in-order
1
(λ (x)
(map (λ (i) (format #t "[~a]" (print i)))
(array->list x))
(λ (row)
(array-for-each (λ (x) (format #t "[~a]" (or x " "))) row)
(format #t "\n"))
board))