LISP: Get all slot names from an class instance [duplicate]

别说谁变了你拦得住时间么 提交于 2019-12-25 04:11:53

问题


I need to make a window with the properties of a class (its slot-values).

It would be something like describe function.

My question is: How do I get all the slots-name for that class?

I wasn't able to find anything about it, only the describe function.


回答1:


How about

(mapcar #'slot-definition-name (class-slots class))


来源:https://stackoverflow.com/questions/40884764/lisp-get-all-slot-names-from-an-class-instance

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!