Defining logical functions as operators with precedence