basic lab03: recursion pattern matching exercise