code: def solve_ifelse(expr, vars):
      
      for condition, result in expr.conditions():
          if boolean.asbool(solve(condition, vars).value):
              return solve(result, vars)
  
      return solve(expr.default(), vars)
docs: Evaluate conditions and return the one that matches.