I am trying to use a more functional approach in my code, and I have a variable `posx` which represents a position on the X axis.

It changes over time `xpos = xpos + pos`: 

```
const createCircle = ({xpos, fill}) => {
 return {
   move: (pos) => {
     xpos = xpos + pos
     noStroke()
     ellipse( xpos,10,10,10)
   }
 }
} 

```

How can I not mutate the variable `xpos`? 

I've read that it is not good to mutate variables... so how would I do it then here?

Or is this ok in this case?

Rest of the code: 

```
const circleOpts = {
  xpos: 20,
  fill: 0,
}

const createCircle = ({xpos, fill}) => {
 return {
   move: (pos) => {
     xpos = xpos + pos
     noStroke()
     ellipse( xpos,10,10,10)
   }
 }
} 

let bola;

function setup () {
  createCanvas(300,500)
  background(3)
  bola = createCircle(circleOpts)
}

function draw () {
 bola.move(10)
}

```