In the provided code, we have implemented the Chain of Responsibility pattern to handle mathematical operations such as addition, subtraction, and multiplication using a sequence of handlers.
The `ChainOfResponsibility` protocol defines the basic structure for the chain, where each handler has a reference to the next handler in the chain. It also declares the `handleRequest` method, which is responsible for passing the request to the next object in the chain or handling it if the current object can handle the request.