Actions seemingly cannot change a single item in a list

While attempting to make a bubble sort algorithm in the graphing calculator, I was given this error:

“The left hand side of ‘→’ should be a variable name like ‘a’.”

Is there a workaround to this?

You basically create a new copy of the list with the desired element changed.

Here’s a replace example

Here’s a swap example