1
我想从列表中更改一个值,然后用另一个参数“返回”listh中的整个列表。我能够达到这个价值,但是我不知道如何在这个变化的情况下返回列表清单。状态由((获取板状态)(get-xycoordinate状态)(获取取向状态))组成。 get-board返回板,get-xycoordinate返回(x,y),get-xcoordinate返回x个位置。计划 - 如何替换/更改列表中的某个位置中的元素
(define (get-board state)
'(
(0 0 0 0 0 0)
(0 0 0 0 0 0)
(0 0 0 0 0 0)
(0 0 0 0 0 0)
(0 0 0 0 0 0)
))
(define (put-mark state)
((+ (list-ref (list-ref (get-board state) (get-xcoordinate state)) (get-ycoordinate state)) 1) (get-xycoordinate state) (get-orientation state)))
在此先感谢!
谢谢!那正是我需要的! –