Add solutions to 3rd example on pattern matching