title: Is it possible to write chained comparison macro in Rust?
body: <p>In rust, it's possible to pass <code>&gt;</code> or <code>&lt;=</code> etc inside macro arguments so long as the arguments are <code>ident</code>s. </p>
  
  <p>Is it possible to create a macro that lets you chain comparison operators?</p>
  
  <pre class="lang-rust prettyprint-override"><code>let x = 3;
  let y = 1;
  let z = -3;
  
  assert_eq!(cond!(z &lt;= x &gt; y), true);
  </code></pre>