Half-baked Clojure code that might be useful