Skip to content

Instantly share code, notes, and snippets.

@fehrenbach
Created April 8, 2010 13:15
Show Gist options
  • Select an option

  • Save fehrenbach/360056 to your computer and use it in GitHub Desktop.

Select an option

Save fehrenbach/360056 to your computer and use it in GitHub Desktop.
(progress
[timestamp]
(let [[out in] (split-with #(< (first %) timestamp) end-timestamp-sorted-map)
new-sorted-map (into (sorted-map) in)
new-hashed-map (reduce
dissoc key-hashed-map
(map first
(filter #(empty? (second %))
(reduce
(fn [m x]
(update-in
m [(key-fn x)]
(fn [vals]
(remove #(= % x) vals))))
key-hashed-map
(flatten (map second out))))))]
(HashSS. new-sorted-map new-hashed-map key-fn)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment