mercredi 20 avril 2022

Design Pattern for successive method calls with previous method's output as input

Is there an appropriate design pattern for when you have to plug the output of a function as the input to the next one? See the example below

public static void main(String[] args) {
    A a = computeA();
    B b = computeB(a);
    C c = computeC(b);
    D d = computeD(c);
    doSomeWork(d);
}

Aucun commentaire:

Enregistrer un commentaire