Behavior Parameterization
This programming pattern preferred when requirements of your project tends to change frequently. As name states, here you build a function and you pass that function as an argument. This way, as main logic not tightly coupled with functionality, when ever changes required, you update the defined behavior. As an example, you are told to process an order transaction with below steps - fetch order transaction - get the payment status - send to the vendor for further processing with order tracking as callback Now assume, you are told to a payment transaction - receive the payment details - user account has balance or not. - if yes, deduct the amount and send the status. Here, you have 2 main behaviours, so you dont call them, but pass these functionalites as arguments to other functions where ever they required.
this way as main logic is not tightly coupled, with in the function which is putting all these pieces together, if any changes needed in the future, you define another new behaviour and stitch it if needed or update existing to match the behaviour.