title: Vectorized indexing for a dictionary
body: <p>I would like to find a succinct syntax in Julia for indexing a dictionary in a vectorized manner. In R, I would do the following:</p>
  
  <pre><code>dict &lt;- c("a" = 1, "b" = 2)
  keys &lt;- c("a", "a", "b", "b", "a")
  dict[keys]
  </code></pre>
  
  <p>In Julia, if I have a <code>dict</code> and <code>keys</code> like this,</p>
  
  <pre><code>dict = Dict(:a =&gt; 1, :b =&gt; 2)
  keys = [:a, :a, :b, :b, :a]
  </code></pre>
  
  <p>then I can achieve the desired result using a list comprehension:</p>
  
  <pre><code>julia&gt; [dict[key] for key in keys]
  5-element Array{Int64,1}:
   1
   1
   2
   2
   1
  </code></pre>
  
  <p>Is there a more succinct vectorized syntax, similar to the R syntax?</p>