I need something like this, a collection of elements which contains no duplicates of any element. Does Common Lisp, specifically SBCL, have any thing like this?
Java – Does Common Lisp have a something like java’s Set Interface/implementing classes
javalispsbclset
Related Question
- Python – Does Python have an ordered set
- Java – ‘Must Override a Superclass Method’ Errors after importing a project into Eclipse
- Java: convert List
to a join()d String - Java – How do servlets work? Instantiation, sessions, shared variables and multithreading
- Python – Get difference between two lists
- How to run SBCL code under a Unix-like operating system in a convenient way
- Java – Why doesn’t RecyclerView have onItemClickListener()
Best Solution
For a quick solution, just use hash tables, as has been mentioned before.
However, if you prefer a more principled approach, you can take a look at FSet, which is “a functional set-theoretic collections library”. Among others, it contains classes and operations for sets and bags.
(EDIT:) The cleanest way would probably be to define your set-oriented operations as generic functions. A set of generic functions is basically equivalent to a Java interface, after all. You can simply implement methods on the standard HASH-TABLE class as a first prototype and allow other implementations as well.