title: How to use map in Haskell with a variable and a list
body: <p>I'm planning to write am map function which essentially takes in a variable and a list and returns a list.</p>
  
  <p>I've tried to use standard map but from what I've seen it's in the format "map function list" when here I'm trying to pass in another argument which is another point.</p>
  
  <pre><code>data Point = {xCoord :: Int,
                yCoord :: Int}
  
  movePoint :: Point -&gt; Point -&gt; Point
  movePoint (Point x y) (Point xMove yMove)
      = Point (x + xMove)  (y + yMove)
  
   // Add a "vector" to a list of points
  movePoints :: [Point] -&gt; Point -&gt; [Point]
  movePoints = error "Not yet"
  </code></pre>
  
  <p>For example, if I have a vector for example (2,2) and I have a list of Points such as [(-2,1),(0,0), (5,4) etc.] I want to use map to add (2,2) to all the Points in the list and return a list of points, I'm not sure how to do it. I'm a newbie when it comes to Haskell so any tips would be great.</p>