The set is a data structures. Most computer languages have this data structure.
It looks like an array (or a vector, in Clojure terms), but every element is unique.
Elements are stored in no particular order.
We can create set data structures by using the set function. We can also create it with var binding.
The syntax is: (set coll)
Let’s try more examples. We will use sentences from “Pride and Prejudice,” Chapter 59.
Copy and paste this into your repl.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def sentences "The evening passed quietly, unmarked by anything extraordinary. The acknowledged lovers talked and laughed, the unacknowledged were silent. Darcy was not of a disposition in which happiness overflows in mirth; and Elizabeth, agitated and confused, rather knew that she was happy than felt herself to be so; for, besides the immediate embarrassment, there were other evils before her. She anticipated what would be felt in the family when her situation became known; she was aware that no one liked him but Jane; and even feared that with the others it was a dislike which not all his fortune and consequence might do away.")