CLOS: How to make a slot have an enforced type of vector of symbols?

后端 未结 2 2083
轮回少年
轮回少年 2021-01-19 01:53

I\'m trying to create a class that can store a vector of symbols in a slot in SBCL. I cannot figure out how to set it up.

My best guess thus far has been

         


        
2条回答
  •  长发绾君心
    2021-01-19 02:03

    You might consider defining an :after method on slot accessor/writer. Also, the ultimate degree of control can be exercised by defining your own metaclass and customization of slot-value-using-class

提交回复
热议问题