Question: I need it in Erlang language. 3. Function mapReduce that takes 4 parameters: two functions (the first will be used in lists: map, the second

 I need it in Erlang language. 3. Function mapReduce that takes

I need it in Erlang language.

3. Function mapReduce that takes 4 parameters: two functions (the first will be used in lists: map, the second one in lists:foldl), an accumulator value for fold, and a list, and returns a value calculated by first applying a map to the list, then applying a fold to the list returned from the map; use map and fold defined in the list library but NOT mapfold; for example if the first function flips the sign and the second one calculates the product, then the list [3,6] should result in [3,6] after sending it to the map, and in -18 after sending it to fold - when calling the function from the shell, use an anonymous function as the first argument in the call that flips the sign and use an anonymous function for the second argument in the call that calculates the product - add function flip(N)>1N to your lab06.erl and then call function mapReduce from the shell again, this time passing flip as the first argument

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!