Equivalence Classes
- by orcik
I need to write a program for equivalence classes and get this outputs...
(equiv '((a b) (a c) (d e) (e f) (c g) (g h)))
=> ((a b c g h) (d e f))
(equiv '((a b) (c d) (e f) (f g) (a e)))
=> ((a b e f g) (c d))
Basically, A set is a list in which the order doesn't matter, but elements don't appear more than once.
The function should…