Side Effect: An unpredictable change in the state of the environment that would break the substitution model and function will no longer be referentially transparent.
When a side-effect is tracked and controlled we call it an effect (Scalar Conf 2025)
functions returning effectful results are hard to compose
Effects types:
Monadic: They use monads (flatMap and map) to compose functions using. e.g Cats-Effect and ZIO
Algebraic: Function type tells exactly what effects are being used, and can handle each effect separately