Simplified and sped up the "type-function" example.

Simplified and sped up the "type-function" example.

There was no need for all the `split()`, `toLowerCase()` jazz. Just typing out the `classToType` object means this should run much faster and it's easier to read too.