The document discusses factoring effects out of impure procedures in Scala. It shows an example of a contest function that originally coupled the logic for computing the winner with printing the output. This was refactored to separate the pure winner logic into its own function, while the contest function now handles just calling winner and printing the result. This illustrates a general technique of factoring an impure procedure into a pure core function and separate input/output handling functions to isolate the side effects.