Question: Hello, how do I implement this in Haskell please? and for numbers 1 & 2 don't use the !! operator 1) a function that returns

Hello, how do I implement this in Haskell please? and for numbers 1 & 2 don't use the !! operator

1) a function that returns the third last item in an input list. I cannot use the !! operator. Assume the list has at least three elements

2) a function to return a list containing every other element starting with the first element. The function should work regardless of size of list and may have even or odd length. Assume the list is not empty.

3)a function to return sum of all positive numbers in a list. The sum of numbers in an empty list should be 0.

Please explain how you implemented these functions. Thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!