title: Map over CompactBuffer in an rdd
body: <p>I have an RDD which was groupByKey as below,</p>
  
  <p>(1, CompactBuffer(2.0, 3.0, 4.0)), 
  (2, CompactBuffer(1.0, -1.0, -2.0))</p>
  
  <p>And I wish to mapValues into (1*x_1^2, 2*x_2^2, 3*x_3^2)</p>
  
  <p>which should look like this, </p>
  
  <p>(1, CompactBuffer(4.0, 18.0, 48.0)),
  (2, CompactBuffer(1.0, 2.0, 12.0))</p>
  
  <p>What should I do?</p>
  
  <p>Thanks for your help.</p>