The coursework is divided into four parts. which contains all the Haskell code and explanations.
a) List and explain (in your own words) 3 benefits that Functional Programming brings to programmers.
b) Explain in your own words what a (mathematical) function is and discuss to what extent Haskell functions resemble mathematical functions
c) Explain what a higher-order function is (use examples to support your answer);
(a) Define a function steps that takes three positive Int values m n p and returns a String that can be displayed as p steps, of height m and width n, the right way up, and repeats the pattern in opposite way.
(b) Define a function flagpattern that takes two positive Int values n greater than or equal to 5, and m greater than or equal to 1, and returns a String that can be displayed as the following m 'flag' patterns of dimension n.
Define a function compatibility, that takes two String values representing persons names, and outputs their compatibility
Define a polymorphic function lsplit that is applied to two arguments of types [a] and a, where a is a type on which == is defined, and partitions the original list at occurrences of the second argument and returns a list of int values of the number of elements for each part