Introduction to Functional Programming Functional programming is a paradigm of computer programming that emphasizes the use…