ex5.14 - one implementation using pattern matching, the other using zipWith() and exists()