title: How to apply a function on each element in a list in Haskell?
body: <p>I have a list of tuples here, and I want to apply function <code>dir..</code>on the first element in each tuple. How can I do that? Thanks a lot in advance!</p>
  
  <pre><code>[ ("grid", gridResponse),
  ("graph", graphResponse),
  ("image", graphImageResponse),
  ("timetable-image", timetableImageResponse x),
  ("graph-fb",toResponse ""),
  ("post-fb",toResponse ""),
  ("test", getEmail),
  ("test-post", postToFacebook),
  ("post", postResponse),
  ("draw", drawResponse),                  
  ("about", aboutResponse),
  ("privacy" ,privacyResponse),
  ("static", serveDirectory),
  ("course", retrieveCourse),
  ("all-courses", allCourses),
  ("graphs", queryGraphs),
  ("course-info", courseInfo),
  ("depts", deptList),
  ("timesearch",searchResponse),
  ("calendar",calendarResponse),
  ("get-json-data",getGraphJSON),
  ("loading",loadingResponse),
  ("save-json", saveGraphJSON)］
  </code></pre>