title: Accessing members of a custom data type in Haskell
body: <p>Say I have the following custom data type and function in Haskell:</p>
  
  <pre><code>data Person = Person { first_name :: String, 
                         last_name :: String,
                         age :: Int 
                       } deriving (Eq, Ord, Show)
  </code></pre>
  
  <p>If I want to create a function <code>print_age</code> to print a Person's age, like so: <code>print_age (Person "John" "Smith" 21)</code> , how would I write <code>print_age</code> to access the age parameter? I'm an Object Oriented guy, so I'm out of my element here. I'm basically looking for the equivalent of Person.age.</p>