title: How to invert a value on Ruby
body: <p>If you have a set of numbers in an array how can you invert them so that the positive ones are negative and the negative are then positive.</p>
  
  <p>I've tried the below, but doesn't seem to work.</p>
  
  <pre><code> def invert(list)
    list.each {|x| x * (-1)}
   end
  </code></pre>