Does Common Lisp have a Java like set interface / implementation class?

I need an element like this, which doesn't contain duplicate elements of any element Is there such a thing in Common Lisp, especially SbCl?

Solution

For a fast solution, just use a hash table, as described earlier

However, if you prefer a more principled approach, you can check fset, which is the "feature set theory collection library" This includes courses and operations for suits and luggage

(edit:) perhaps the cleanest approach is to define set - oriented operations as generic functions After all, a set of generic functions is basically equivalent to a java interface You can simply implement the methods of the standard hash - table class as the first prototype and allow other implementations

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>