title: Swift Ternary, return tested value
body: <p>In my code, I check if a system function is equal to zero or not, if yes I return an other value, if not, I return the tested value.</p>
  
  <pre><code>    (class.verylongfunc(arg, arg) == 0) ? othervar : class.verylongfunc(arg, arg)
  </code></pre>
  
  <p>Here is a better and cleaner way to do that ? I don't want to call the function two times...
  I know I can do </p>
  
  <pre><code>  let tmp = class.verylongfunc(arg, arg)
    (tmp == 0) ? othervar : tmp
  </code></pre>
  
  <p>But it take two lines...</p>