ch 4, ex 1 (pattern matching everywhere)