tcon: routines for creating typesafe generic containers