title: Julia Universal Comparison Operator
body: <p>I usually use Crystal when I write my code. In Crystal, there is the <code>&lt;=&gt;</code> comparison operator. Usage is simple:</p>
  <pre><code>p! 404 &lt;=&gt; 405
  </code></pre>
  <p>This would print the following in my terminal:</p>
  <pre><code>404 &lt;=&gt; 405 # =&gt; -1
  </code></pre>
  <p>The printed value is <code>-1</code>, but if the integers in the equation were switched, it would print <code>1</code>, as 405 is greater than 404. If the integers were equal, it would print <code>0</code>.</p>
  <p>I would like to use something similar in a Julia program I am writing, but can't seem to find an operator that works. I can of course use if-else if-else logic but I am really only concerned with storing the value in a database.</p>