title: haskell set data type
body: <p>hey everyone I am trying to figure out how to make a set data type in haskell, but I cannot figure this out, this is what i have so far, i am a bit confused</p>
  
  <pre><code>data Set a = Node a | List {
      list :: [a]
  }deriving(Eq,Show,Ord)
  
  insert :: Set Integer -&gt; Set Integer -&gt; Bool
  insert (Node itemToInsert) (List list)
      |contains (List list) (Node itemToInsert) == False = List(list:(Node itemToInsert))
  
  
  contains :: Set Integer -&gt; Set Integer -&gt; Bool
  contains (List []) (Node numberToFind) = False
  contains (List (x:xs)) (Node numberToFind)
      |x == (Node numberToFind) = True
      |otherwise = contains (List (xs)) (Node numberToFind)
  </code></pre>
  
  <p>Thanks for the help!</p>