Is it deterministic? Does it do destructive updates?
A single step that isn't consistent in behavior across every setup is enough to make the entire process non-deterministic.
This is destructive:
this.position += this.velocityThen you can do whatever you want with that series of immutable instants. You might pass that data structure to a function for rendering, or for storing history, or whatever else. You might even do something clever like pass two consecutive steps into your rendering function, so you can calculate motion blur between them.
Treating each simulation step as an instance of a data structure means you decouple the simulation state and time from your program state and time. Novice programmers often use global variables to hold the state of a simulation or game, but there's a smarter way to do it. You insert a layer of abstraction between your program's control flow and the simulation's time flow.
I also wrote a tutorial on how constraints work (probably the the most difficult part)