title: Remove an object from the array then update the property of all objects
body: <p>I want to remove an object by id from an array and then update the position property for all objects. For example I have an array like:</p>
  
  <pre><code>const arr = [
    {id: 10, position: 1},
    {id: 11, position: 2},
    {id: 12, position: 3},
    {id: 13, position: 4}
  ]
  </code></pre>
  
  <p><strong>Example:</strong> First I need to remove the object with id 12 then change the position property for each object. Result:</p>
  
  <pre><code>const arr = [
    {id: 10, position: 1},
    {id: 11, position: 2},
    {id: 13, position: 3}
  ]
  </code></pre>
  
  <p><strong>My attempt:</strong></p>
  
  <pre><code>const fn = id =&gt; pipe(
    reject(propEq('id', id)),
    map((item, key) =&gt; evolve({position: key}))
  );
  </code></pre>