Description: The type function maps variables to typecodes. (Contributed by Mario Carneiro, 18-Jul-2016)