example 4-1 pattern matching with case.