Functional programming composes declarative functions and discourages mutation and side effects. Rust does not prohibit state changes: mutability is opt-in, and closures and iterators provide core functional features. section 3.2
A pure function has no side effects and returns the same result for the same inputs. Such functions are referentially transparent: a call can be replaced by its result without changing program behavior. section 9.1
Immutability and pure functions can make code easier to:
- Reason about, test, and reuse. section 9.1
- Refactor and optimize, because referential transparency preserves behavior when calls are replaced by their results. section 9.1
- Share safely: immutable data avoids mutation-related race concerns, though shared state may still exist. section 9.1


















