More specifically: how would I sort a vector of structs by the value of a certain key?
For instance, if I had:
(defstruct Item :weight :value :cost
(def my-items [(struct Item 30 50 5)
(struct Item 15 75 20)
(struct Item 50 10 35)])
How would I sort all of the items in the vector by, let’s say, value?
Use sort-by