title: Ramda recommendation for removing duplicates from a slightly nested array
body: <p>We're trying to utilise Ramda to avoid some brute-force programming. We have an array of objects that can look like this:</p>
  
  <pre><code>[
  {id: "001", failedReason: [1000]},
  {id: "001", failedReason: [1001]},
  {id: "001", failedReason: [1002]},
  {id: "001", failedReason: [1000]},
  {id: "001", failedReason: [1000, 1003]},
  {id: "002", failedReason: [1000]}
  ]
  </code></pre>
  
  <p>and we'd like to transform it so that it looks like this:</p>
  
  <pre><code>[
  {id: "001", failedReason: [1000, 1001, 1002, 1003]},
  {id: "002", failedReason: [1000]}
  ]
  </code></pre>
  
  <p>Essentially it reduces the array based on the id, and accumulates a sub-"failedReason" array containing all of the "failedReasons" for that id. We were hoping some Ramda magic might do this but so far we haven't found a nice means.  Any ideas would be appreciated. </p>