Pattern matching example