Fixed syntax error
Example of how to pattern match in function.