types+grammar: fixed bug in code snippet in ch2, per #170