title: Execute statement inside conditional
body: <p>Is it possible to call an executable function inside a Twig conditional statement?</p>
  
  <p>I have a path function and want to output the path if the name variable is empty. Right now I have these two options:</p>
  
  <pre><code>{% path file, 'reference' %} // calling path function
  {{ file.name ?: file.path }} // Conditional
  </code></pre>
  
  <p>But I would like something like:</p>
  
  <pre><code>{% file.name ?: path file, 'reference' %}
  </code></pre>