Please Implement The Following Function In Haskell

Please Implement The Following Function In Haskell