title: Changing one item in a list In immutable.js
body: <p>I'm using immutable.js, my data structure is like:</p>
  
  <pre><code>class ItemList extends Record({
      items: new List()
  })
  </code></pre>
  
  <p>I want to write function that change one item in this list and keep other the same. For example, a list of {1, 2, 3, 4}, I need a function if an item equals 2, change it to 5.</p>
  
  <p>I'm using something like</p>
  
  <pre><code>updateInfo(updatedInfo) {
      return this.withMutations(itemList =&gt; {
          itemList.set('items', list);
      });
  }
  </code></pre>
  
  <p>My question is in this function, how can I just update one item? where should I put the if judgment?</p>
  
  <p>Thanks!</p>