Codes while reading "Essentials of Programming Languages"