title: In Nimrod, what is the syntax for bitwise operations?
body: <p>I'm just discovering Nimrod and have a basic question (couldn't find the answer in the documentation).</p>
  
  <p>How do you use bitwise operations ? I have the following code, where x is defined as an int :</p>
  
  <pre><code>if x and 1:
  </code></pre>
  
  <p>This does not compile :</p>
  
  <pre><code>Error: type mismatch: got (range 0..1(int)) but expected 'bool'
  </code></pre>
  
  <p>And if I try:</p>
  
  <pre><code>if and(x, 1)
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>Error: type mismatch: got (tuple[int, int])
  but expected one of:  
  system.and(x: int16, y: int16): int16
  system.and(x: int64, y: int64): int64
  system.and(x: int32, y: int32): int32
  system.and(x: int, y: int): int
  system.and(x: bool, y: bool): bool
  system.and(x: int8, y: int8): int8
  </code></pre>
  
  <p>What's the trick ?</p>