Referential transparency lets programmers and compilers to think of code as a rewrite system—something that takes an expression and replaces it with something else. This can help with several tasks, such as: