type checking still doesn't work when passing functions
type checking appears to be working, though sometimes the error message prints more than it should. functions returning functions are supported, functions returning functions returning functions are not.