Functions chain is very strong pattern in functional programing.
Let see a very simple example:
The evaluation of a functions chain takes place from right to left.
The last step is to create a universal chain function with any number of arguments. I use the reduceRight function from the array with this.