What is a pure function?
A pure function is a function whose output depends only on its input parameters. A pure function has a deterministic behavior. This means that if it is called several times with the same values as input, then it will returns the same results. This deterministic behavior is called referential transparency in functional programming.
What is a higher-order function?
A higher-order function is a function that takes a function as an input parameter, and/or returns a function as an output. Higher-order functions are very useful for implementing abstractions or generic behaviors.
Why should side-effects be as small as possible?
Side-effects are parts of code that are not deterministic. This implies that this code is more difficult to test than pure code. So, making the footprint of side-effects as small as possible makes the whole application easier...