Type Learning