title: If you can't change a variable's value in Haskell, how do you create data structures?
body: <p>As per the title.</p>
  
  <p>I have the following code which creates a binary search tree, but if I want it created and changed dynamically with user input, how would I do that if I can't change the value of a variable in haskell?!?</p>
  
  <pre><code>find :: (Ord a) =&gt; Node a -&gt; a -&gt; Bool
  find (Node val left right) s
      | s == val      = True
      | s &lt; val       = find left s
      | s &gt; val       = find right s
  
  find Empty s = False
  
  data Node a = Node a (Node a) (Node a)
                | Empty
  
  myTree = Node "m"   (Node "a" Empty Empty)
                      (Node "z" Empty Empty)
  </code></pre>
  
  <p>Thanks in advance!</p>