I'm looking for a specific design pattern that is used to implement function composition. The goal is to be able to pass an object that represents a set of operations applied on a specific sequence to a client, and let the client apply the operations without caring what they might be. The pattern covers the following requirements:
- needs to apply an operation to an input (i.e., maps a given input to an output)
- operations must be composable
- each operation can be applied in isolation or composed with other operations
Requirement #1 sounds like a strategy pattern or command pattern, while requirement #2 brings the composite design pattern to mind.
Does anyone know if there's a OO design pattern that fits these requirements?
Aucun commentaire:
Enregistrer un commentaire