title: Haskell accessing fields in custom data types
body: <p>For an assignment I have to implement different functions for the custom data type tree (as defined below)</p>
  
  <p>I would like to accees the 'Label' (node-value) of the root node of my tree using the faulty function <code>getNodeValue</code>. I'd be very grateful for some help on how to do this!</p>
  
  <pre><code>data Tree = Node (Label -&gt; Label) Label [Tree]
  type Label = Int
  
  testTree = Node (+1) 0 [Node (+1) 1 [], Node (+1) 2 [], Node (+1) 3 []]
  
  getNodeValue :: Tree -&gt; Label
  getNodeValue t = {... how does I custom types? ...}
  </code></pre>