title: Self Executing Anonymous Functions via Lambdas
body: <p>In javascript, there's the common pattern of creating an anonymous function and immediately invoking it (usually this is called a <a href="http://markdalgleish.com/2011/03/self-executing-anonymous-functions/" rel="noreferrer">self-executing anonymous function</a> or an <a href="http://benalman.com/news/2010/11/immediately-invoked-function-expression/#iife" rel="noreferrer">immediately-invoked function expression</a>).</p>
  
  <p>With Java 8 lambdas, is there a standard way to replicate this behaviour?
  Something like <code>(() -&gt; doSomething())()</code>.</p>
  
  <p><a href="https://stackoverflow.com/questions/24290803/self-executing-java-methods">This question</a> asks basically the same question, but for Java 7. I'm explicitly looking for constructs which utilize lambdas.</p>