Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个结构:
(define-struct abc (item-list x y))
我想迭代地访问作为列表的 item-list 的元素。我如何在球拍中实现这一点?
我试过了:
(abc-item-list a)
但不起作用。
注意:我使用的是中级学生语言。
这个对我有用:
#lang htdp/isl ;https://stackoverflow.com/questions/18303242/selecting-student-language-in-racket-source-code (define-struct abc (item-list x y)) (define test (make-abc (list 1 2) 4 5)) (abc-item-list test) ; ==> (list 1 2)