**_IF_** you have been looking for a shorthand if statement here is some code
    
    
    type
      pair*[T] = (T,T)
    
    template `|`*[A](a:A,b:A):pair[A] = (a,b)
    
    template `?`*[T](cond:bool,res:pair[T]):untyped =
      if cond:
         res[0]
      else:
        res[1]
    
    
    Run

Reply via email to