title: Modify a list in haskell
body: <p>I have a list of chars</p>
  
  <pre><code>left = ['h', 'e', 'l', 'l', 'o']
  </code></pre>
  
  <p>and the function</p>
  
  <pre><code>typer :: [Char] -&gt; Char -&gt; [Char]
  typer left c = left ++ [c]
  </code></pre>
  
  <p>Which seems to work if I type <code>typer left 'a'</code> into <code>ghci</code> it returns <code>"helloa"</code> but if I then try to read <code>left</code> it returns <code>"hello"</code>. Where does the <code>"a"</code> go? is there anyway to manipulate <code>left</code> using the function?</p>
  
  <p><a href="https://i.stack.imgur.com/wUBfT.png" rel="nofollow noreferrer">example of console output </a></p>