add type for the cons operator