title: How to extract multiple values from a record haskell
body: <p>Currently, I am using list comprehension to go through a list of my custom data type</p>
  
  <pre><code>data Person = Person{ fname :: String
                      , lname :: String
                      , age :: Int
                      , siblings :: [String]
                      }
  </code></pre>
  
  <p>The issue is currently I am doing 
  <code>["First name: " ++ fname z ++ "\n" ++ "Last name: " ++  lname z]</code> where each <code>z</code> is a <code>Person</code> from a list of <code>Person</code>. </p>
  
  <p>I've tried using something like</p>
  
  <pre><code>fas :: [Person] -&gt; [String]
  fas listOfPerson = map fname listOfPerson
  </code></pre>
  
  <p>but how can I use map to get multiple fields from the record?
  from what I understand map takes a function and a list and applies that function to every element in the list, making a new list. Because I want the output to be a single list, I only need to call <code>map</code> once, or somehow combine multiple map calls into a single list where all the information is in order?</p>
  
  <p>e.g something like this?</p>
  
  <pre><code>fas :: [Person] -&gt; [String]
  fas listOfPerson = map (fname, lname, age) listOfPerson
  </code></pre>
  
  <p>thank you </p>