Helper function for constructing an if-then-else branch as an expression.
return type of thenClause or elseClause
if predicate returns True, the result of thenClause, else the result of elseClause