This code takes in a syntax tree and simplifies it, replacing expressions with their equivalent value if their children are all immutable symbols.