title: What is the best way to combine two immutable lists?
body: <p>I have two lists and i'm trying to combine them to a new list so that the existing ids are updated and the new ones are added to list and after that sorted by the id. Is there a better or more efficient way to do this?</p>
  
  <pre><code>// Original list
  const list = Immutable.List([
      { id: 1, name: 'List Item 1' },
      { id: 2, name: 'List Item 2' },
      { id: 3, name: 'List Item 3' },
  ]);
  
  // One updated item and two new items
  const newList = Immutable.List([
      { id: 2, name: 'Updated List Item 2' },
      { id: 4, name: 'New List Item 4' },
      { id: 5, name: 'New List Item 5' },
  ]);
  
  // Get updated ids
  const ids = newList.map((item) =&gt; item.id);
  
  // Filter out updated ids from orignial list
  const filteredList = list.filterNot(item =&gt; ids.includes(item.id));
  
  // Concat and sort by id
  const concatList = newList
      .concat(filteredList)
      .sortBy(item =&gt; item.id);
  
  console.log(concatList.toJS());
  
  /* Outputs as desired
  [
      { id: 1, name: "List Item 1" },
      { id: 2, name: "Updated List Item 2" },
      { id: 3, name: "List Item 3" },
      { id: 4, name: "New List Item 4" },
      { id: 5, name: "New List Item 5" }
  ]
  */
  </code></pre>