I think `list` is an unfortunate choice for a variable name, `x` was fine, but maybe `arr` or `a` instead.