I'd like to convert initial if else statements in a function to a list of expressions so that I can more efficiently ensure compatibility between real and expected input data. Is there a way to extract any set of if statements of the form
if (some expression){
some code }
into a list of expressions?