title: Reduce Hash Values
body: <p>I am having trouble with the syntax for reduce.  I have a hash of the following format:</p>
  
  <pre><code>H = {"Key1" =&gt; 1, "Key2" =&gt; 2}
  </code></pre>
  
  <p>I would like to use reduce to find the sum of the values in this function.</p>
  
  <p>Something Like </p>
  
  <pre><code>H.reduce(0) {|memo, elem| memo+=elem}
  </code></pre>
  
  <p>I know this is wrong.  I dont understand how I can make elem the value of the hash.</p>