title: C# 7 tuples and lambdas
body: <p>With new c# 7 tuple syntax, is it possible to specify a lambda with a tuple as parameter and use unpacked values inside the lambda?</p>
  
  <p>Example:</p>
  
  <pre><code>var list = new List&lt;(int,int)&gt;();
  </code></pre>
  
  <p>normal way to use a tuple in lambda:</p>
  
  <pre><code>list.Select(value =&gt; value.Item1*2 + value.Item2/2);
  </code></pre>
  
  <p>i expected some new sugar to avoid <code>.Item1</code> <code>.Item2</code>, like:</p>
  
  <pre><code>list.Select((x,y) =&gt; x*2 + y/2);
  </code></pre>
  
  <p>The last line does not work because it is treated as two parameters for lambda. I am not sure if there is a way to do it actually.</p>
  
  <p>EDIT:</p>
  
  <p>I tried double parentesis in lambda definition and it didn't work: <code>((x,y)) =&gt; ...</code>, and maybe it was stupid to try, but double parenthesis actually work here: </p>
  
  <pre><code>list.Add((1,2));
  </code></pre>
  
  <p>Also, my question is not quite about avoiding ugly default names <code>.Item .Item2</code>, it is about actual unpacking a tuple in lambda (and maybe why it's not implemented or not possible). If you came here for a solution to default names, read <a href="https://stackoverflow.com/a/43082087/1788106">Sergey Berezovskiy's answer</a>.</p>
  
  <p>EDIT 2:</p>
  
  <p>Just thought of a more general use case: is it possible (or why not) to "deconstruct" tuple passed to a method? Like this:</p>
  
  <pre><code>void Foo((int,int)(x,y)) { x+y; }
  </code></pre>
  
  <p>Instead of this:</p>
  
  <pre><code>void Foo((int x,int y) value) { value.x+value.y }
  </code></pre>