Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (doseq [{id :_id tags :tags diff :difficulty} (fetch :problems)]
- (when-not diff
- (let [[[diff] tags] ((juxt filter remove) #{"easy" "elementary" "medium" "hard"} tags)]
- (update! :problems {:_id id}
- {:$set {:difficulty (clojure.contrib.string/capitalize (or diff "")), :tags tags}}
- :upsert false, :multiple true))))
Add Comment
Please, Sign In to add comment