Implement operator<< for conses.