title: How do I get the output of a closure without assigning it to a variable?
body: <p>I want to write this as a single line and not have to do a variable assignment:</p>
  <pre><code>def output = myclosure [sdfsdf:&quot;sdfsdf&quot;] // should return &quot;somestring&quot;
  assert output == &quot;somestring&quot;
  </code></pre>
  <p>I can't figure out the syntax to just do something like this:
  <code>assert myclosure: &quot;sdfsdfds&quot; == &quot;somestring&quot;</code></p>