(define (place-queen board i j) (let ; copy the board that is got from function. ; I will change it via (vector-set!) and return it [(output board)] (begin ; set the queen (vector-set! (vector-ref output i) j 'q) ; set the positions that it is threatening (for-each (lambda (item) ; (car item) is column ; (cadr item) is row (vector-set! (vector-ref output (car item)) (cadr item) #f)) (get-threatened-positions (vector-length board) i j)) output)))