title: Iterate Cartesian product
body: <p>Until recently, I used the ancient coding style like</p>
  
  <pre><code>        for (var i in list) for (var j in list)
              connect(list[i], list[j])
  </code></pre>
  
  <p>Things have changed once I have realized that I can forEach since JS6</p>
  
  <pre><code>    () =&gt; list.forEach(i =&gt; list.forEach(j =&gt; connect(i,j)))
  </code></pre>
  
  <p>I wonder if there is further syntax to optimize the latter into </p>
  
  <pre><code>    () =&gt; (list, list).forEach((i,j) =&gt; connect(i,j))
  </code></pre>