I am working with Haskell, and one of the big problems I have with writing programs is that when I want to do something to an object, my program forgets everything I did with it before. When you implement trees with zippers for example, to be able to tell where you are on the tree, every time you move you have to store all the nodes to your left and right in your path. Similarly, if I want to write a simple depth first search, I feel like I have to keep another, separate record of which vertices I've visited, and which I want to go to next, lest I return to an old vertex and forget where I've been.
My question is: does this keep happening? Is the 'correct' way to write functional programs for data that changes to drag around all the things you've done in the past?