add typeOf for NTuples; make NTuple covariant

This pull request will enable defining functions taking NTuples.
1) those are defined in the scope of main and are not public.