Write arecursive Haskell function (you cannot use existing functions) todo the following:
Write a functionlongestString that takes a string list and returns the longeststring in the list. If the list is empty, return “” (i.e., an emptystring). In the case of a tie, return the string closest to thebeginning of the list. For example:
longestString [“abc”, “Hello”, “car”, “apple”] -> “hello”
longestString [] ->””
Solution