subject

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) -> -1 * N to your lab06.erl and then call function mapReduce from the shell again, this time passing flip as the first argument

This is for Erlang language.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:40
You are working with a professional edition organization. they wish to install the expense tracker which requires the use of 4 custom tabs, 3 custom objects, and one custom app. if the company is already using 4 applications, 36 custom objects, and 7 custom tabs, what will happen when they try to install expense tracker?
Answers: 1
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
You know the right answer?
Function mapReduce that takes 4 parameters: two functions (the first will be used in lists:map, the...
Questions
question
Mathematics, 31.03.2021 21:00
question
Mathematics, 31.03.2021 21:00
question
Mathematics, 31.03.2021 21:00
question
Mathematics, 31.03.2021 21:00
Questions on the website: 13722363