title: How to change an element in a list in erlang
body: <p>I have a list which I have used the function <code>lists:nth()</code> on to return the value of an element at a certain index. Does anyone know how I can edit this value?</p>
  <p>EDIT: Here is a bit more information.</p>
  <p>Say I had a list L which represents a line of a text based grid</p>
  <pre><code>L = [H,H,H,H,H].
  </code></pre>
  <p>And I want to access a specified element say for example the third one and change it to E. Then if I was to use the list L again it would be</p>
  <p><code>[H,H,E,H,H]</code></p>
  <p>I hope this makes more sense.</p>
  <p>Thank you.</p>