title: pairs of values in swift 3
body: <pre><code>var par = [[Double]]()
  
  par.append(Array(stride(from: -1, through: 10, by: 1.0)))
  
  //par[0] == [-1.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
  
  par.append(Array(stride(from: -10, through: 1, by: 1.0)))
  
  //par[1] == [-10.0, -9.0, -8.0, -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0]
  //there could be more much more arrays in par…
  
  //Total combinations, 144 in this case
  
  var c: Int = 0
  c = par[0].count
  for i in 1 ..&lt; par.count {
  c *= par[i].count
  }
  
  for i in 0 ..&lt; c {
  //?
  }
  </code></pre>
  
  <p>Hi! The question is what's the easiest way to make an array with values from par[0], par[1], ...? In this case 12x12: [-1.0, -10.0], [-1.0, -9.0], ..., [10.0, 1.0], but it could be 2x20, 2x10x50, 10x10x20x20…</p>