title: coffeescript dictionary set default
body: <p>In Python if you have a dictionary that consists of lists like</p>
  
  <pre><code>   mydict = {'foo': [], 'bar':[3, 4]}
  </code></pre>
  
  <p>and if you want to add something into that lists you can do</p>
  
  <pre><code>   mydict.setdefault('baz', []).append(5)
  </code></pre>
  
  <p>not to write</p>
  
  <pre><code>key, list_element = 'baz', 5
  if key in mydict:
      mydict[key].append(list_element)
  else:
      mydict[key] = [list_element]
  </code></pre>
  
  <p>is there an equivalent for this in Coffeescript?</p>