<What is the best way to manage an object through ...
# stackoverflow
u
What is the best way to manage an object through a list of sequential domino operations? Let us suppose we have an Order class and a method in which some services make a sequence of operations fun doStuff(order: Order): Order { val orderByServiceA = serviceA.operationA(order: Order) val orderByServiceB = serviceB.operationB(orderByServiceA: Order) val orderByServiceC = serviceC.operationC(orderByServiceB: Order) return orderByServiceC } I create a common interface who can be implemented by the services interface IOrderService { fun operation(order: Order): Order } So the...