II. Functional Programming and the Real World

To understand how a functional program can handle side effects, think of a side effect as changing something in the world outside of the program's data space. Imagine that the world flickers from one reality to another as things change. A program which changes the world then is something like this

my_prog old_world --> new_world

Instead of changing the world it makes a new one, flickering from change to change on the way.