Question: (30) Functional Programming using Haskell. a) Write a function add_two [x], which takes as input a list x of Doubles, and returns the list containing

 (30) Functional Programming using Haskell. a) Write a function add_two [x],

(30) Functional Programming using Haskell. a) Write a function add_two [x], which takes as input a list x of Doubles, and returns the list containing sums of pairs of values in x. If x has an odd number of elements, its last value is ignored. b) Write a function in subset[ x], which takes as input list x of Integers and returns the subsets of the list. Example: subset []=[[]] subset [1,2,3]=[[1,2,3],[1,2],[2,3],[1,3],[1],[2],[3],[]]

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!