I am trying to created a function to get the list of previous values. I have a non elegant way of doing it in a function below, but it uses a mutable currValue. I am trying to avoid having this var outside of the map. I am trying to created a function to get the li