title: Haskell- Two lists into a list of tuples
body: <p>I am trying to implement a function (described below) that takes two lists (each or both may be infinite) and return a list of tuples of all the possible pairs of elements between the lists</p>
  
  <pre><code>zipInf :: [a] -&gt; [b] -&gt; [(a,b)]
  </code></pre>
  
  <p>(e.g the output should be like this, but doesn't have to be exactly like this)</p>
  
  <pre><code>zipInf [0 .. 2] ['A' .. 'C'] ~&gt; [(0,'A'),(1,'A'),(0,'B'),(1,'B'),(0,'C'),(2,'A'),(2,'B'),(1,'C'),(2,'C')]
  
  zipInf [] [0 ..] ~&gt; []
  
  zipInf [0 ..] [] ~&gt; []
  
  take 9 (zipInf ['A'] [0 .. ]) ~&gt; [('A',0),('A',1),('A',2),('A',3),('A',4),('A',5),('A',6),('A',7),('A',8)]
  </code></pre>
  
  <p>I've started implementing it like this:</p>
  
  <pre><code>zipInf :: [a] -&gt; [b] -&gt; [(a,b)]
  zipInf [] _ = []
  zipInf _ [] = []
  zipInf
  </code></pre>
  
  <p>I wanted to feed the list into a helper function to produce the lists but the one I made fails to compile and don't know how to handle infinite lists</p>
  
  <p>Helper function-</p>
  
  <pre><code>oneList :: [a] -&gt; [b] [(a,b)]
  oneList [] _ = []
  oneList x:xs y:ys = [(x,y)] ++ oneList
  </code></pre>