Use array_reduce() to generate pipeline of callbacks.