The big no-no in pure functional programming is the existence of unmanaged side-effects. But who's to say we can't just manage them instead? What if we reframe our perspective a little and start explicitly describing an environment (or "world") in which these effects can occur? This is where it gets really interesting.
In lambda calculus, recall that lambda functions are curried unary functions. In linear algebra, we pay a lot of attention to linear independence and, consequently, the dimension of vector spaces. What these boil down to is that when describing a multi-variate system, each dimension/independent variable is basically another layer of function compositions. Note the term "layer" is highly relative here.
To draw some heavily simplified real-world parallels, let's consider the motion of water or air molecules as a group. Together, we can model the overall periodic motion of them—seen as a pretty ocean wave or heard as a sound—as a sinusoidal function with some asymmetry. Though, we can model the motion of each molecule, each individual particle, etc. at some arbitrary depth as well. Whether these systems affect the values of other neighboring systems is a physical manifestation of dependence. These are all function compositions that you can define and combine at essentially infinite depths, depending on your level of autism and the task at hand.
So now let's take this idea of arbitrarily deep reference frames and apply it to programming: we can define an action we wish to take in our "world" and we can describe how such action affects the world state. This is typically done using monads. If we ensure the value of a monad is bound in a function that computes another monad of the same type, what we have is a chain of causality, where the result of each action is passed as input needed to perform the next action. The monad acts as an abstraction layer for observing and interacting with our created world, much like how our brains can be seen as computers, possible to model functionally, interacting with an inconceivably huge mathematical model (the Universe) using our bodies to observe and interact with it.