https://medium.com/@felixdavid12/dive-into-the-world-of-functional-programming-in-javascript-38598a83ce3a