More support for ifThenElse and lambda