title: Elegant way to disperse values of array on a boolean mask
body: <p>Say I have an array of values I got from this dates interval <code>[10/10/2018 - 20/10/2018]</code>. Some days have values attached like temperature; Other's don't. 
  A Boolean mask of presence of value is like <code>[1,0,0,0,1,0,0,1,0,0]</code>.
  and temperature measures are like <code>[10, 12, 9]</code>.</p>
  
  <p>What would be an elegant way to disperse values based on mask to get all date measures excepting nulls (-1, null, ...)</p>
  
  <p>result: </p>
  
  <pre><code>[10,-1,-1,-1,12,-1,-1,9,-1,-1]
  </code></pre>
  
  <p>Edit: for sake of showing effort. I came up with this:</p>
  
  <pre><code>missing_mask.map(function(m) {
      if (m == 1)
          return values.reverse().pop();
      else
          return 0;
  })
  </code></pre>