Prototype implementation of ifthenelse operator.