In particular, you can obtain the following:

Appendix

The appendix containing the type derivation for the extended example can be found here.