I like minimal scope of variables, how about keeping this variable and instead reduce the scope of `list` in the following branch?