updated Clojure answer
will work on Ruby and C answers later