title: Why don't keys and vals work on vectors?
body: <p>I often find myself in a situation where I really don't care whether I have a vector or a map:</p>
  
  <pre><code>[:foo :bar :baz :qux]
  {0 :foo, 1 :bar, 2 :baz, 3 :qux}
  </code></pre>
  
  <p>The important functions (<code>get</code>, <code>assoc</code>, etc.) work on both. Some, like <code>dissoc</code>, don't work on vectors, but they have good reasons not to.</p>
  
  <p>However, I simply don't understand why <code>keys</code> and <code>vals</code> work on maps and <em>not</em> on vectors. Is there any good reason why they aren't implemented something like this (or maybe with a more elegant, polymorphic solution instead)?</p>
  
  <pre><code>(defn keys [m]
    (if (vector? m)
      (seq (range (count m)))
      (clojure.lang.RT/keys m)))
  
  (defn vals [m]
    (if (vector? m)
      (seq m)
      (clojure.lang.RT/vals m)))
  </code></pre>
  
  <p>If there is no good reason, how can I go about trying to get this implemented in standard Clojure?</p>