pattern matcher from simply scheme ch 16