The program of haskell function will be:
sumMyNested :: [MyNested] -> Int
sumMyNested [] = 0
sumMyNested (MyItem x:xs) = x + sumMyNested xs
sumMyNested (MyArray x:xs) = sum (map sumMyNested x) + sumMyNested xs
What is haskell function?
Haskell is a purely programming language of functional. This means that Haskell functions act more like mathematical functions. A function performs an operation on the input parameters and returns the result. Functions do not change the state of the system. In this section, we will introduce Haskell functions using examples from the code snippet below. The Haskell concept is based on pure functions and immutable data.
To learn more about haskell function
https://brainly.com/question/15055291
#SPJ4