Implement pattern matching for "For-Each" and "LINQ".