title: Haskell list comprehension 0's and 1's
body: <p>I am trying to write a function </p>
  
  <pre><code>row :: Int -&gt; Int -&gt; [Int]
  row n v
  </code></pre>
  
  <p>that returns a list of <code>n</code> integers, all <code>0</code>'s, except for the <code>v</code>th element, which needs to be a <code>1</code>.</p>
  
  <p>For instance, </p>
  
  <pre><code>row 0 0 = []
  row 5 1 = [1,0,0,0,0]
  row 5 3 = [0,0,1,0,0]
  </code></pre>
  
  <p>I am new to Haskell and having a lot of difficulty with this. In particular I can't figure out how to make it repeat <code>0</code>'s. I understand the concept of building a list from let's say <code>[1..n]</code>, but I just get <code>[1,2,3,4,5]</code></p>
  
  <p>Any help with this would be greatly appreciated. Thank you.</p>