title: Java Lambdas and Closures
body: <p>I hear lambdas are coming soon to a Java near you (J8). I found an example of what they will look like on some blog:</p>
  
  <pre><code>SoccerService soccerService = (teamA, teamB) -&gt; {
      SoccerResult result = null;
      if (teamA == teamB) {
          result = SoccerResult.DRAW;
      }
      else if(teamA &lt; teamB) {
          result = SoccerResult.LOST;
      }
      else {
          result = SoccerResult.WON;
      }
  
      return result;
  };
  </code></pre>
  
  <p>So right off the bat:</p>
  
  <ul>
  <li>Where are <code>teamA</code> and <code>teamB</code> typed? Or aren't they (like some weird form of generics)?</li>
  <li>Is a lambda a <em>type</em> of closure, or is it the other way around?</li>
  <li>What benefits will this give me over a typical anonymous function?    </li>
  </ul>