builtin type functions

Type inference of builtins as type functions