We know that pure functions:
This leads us to referential transparency - where an expression can be replaced with a value without changing the behaviour of the program.
This tells us that a program can be said to be purely functional if it excludes destructive modifications (updates) of entities in the program's running environment.
When we look at Software Transactional Memory, we see a concurrency control mechanism analogous to database transactions for controlling access to shared memory in concurrent computing. But nothing about that is particularly functional on its own.
My question is: Can we consider Clojure's STM 'functional'?
Clojure STM is intentionally not "pure functional" because it is intended to manage state, and updating state is a side-effect. This reflects Clojure's design philosophy as a language that prefers functional programming by default, but still supplies you with the tools to do useful/stateful things, in a hopefully controlled manner.