title: Get element from sequence in clojure
body: <p>I understand that lists and vectors in Clojure can be used almost interchangeably in most situations.  Here is a simple case that surprised me </p>
  
  <pre><code>(nth [2 4] 0) ;=&gt; 2
  (nth '(2 4) 0) ;=&gt; 2
  (get [2 4] 0) ;=&gt; 2
  (get '(2 4) 0) ;=&gt; nil -- wtf???
  </code></pre>
  
  <p>The documentation of <code>get</code> talks mapping a key, but it works with vectors or sets just fine.  The documentation of <code>nth</code> even mentions <code>get</code>, talking about their differences only in edge-cases.</p>
  
  <p>The real-world situation where I faced this weird behavior was that I loaded a yaml file.  It resulted in a nested structure of maps and lists.  I wanted to access an element with <code>get-in</code>.</p>
  
  <pre><code>(def form (parse-yaml some-yaml-file))
  (def best-friend (get-in form [:friends 0 :first-name]))
  </code></pre>
  
  <p>It doesn't work, because <code>get-in</code> uses <code>get</code> internally.  So I have a theoretical and a practical question:</p>
  
  <ul>
  <li>Is this behavior of <code>get</code> considered correct and expected?  If so, please, explain why.</li>
  <li>How can I access a nested element in such a structure of maps and lists?</li>
  </ul>