binary version of ternary operators