implementing an `if` macro