A Clojure library provides the ranked-set, a set which allows you to retreive and cut elements from the set based on the magnitude of their rank.