Question: This question is about finding the function body for a function compute based on the input / output behavior of the function compute. Consider the

This question is about finding the function body for a function compute based on the input/output behavior of the function compute. Consider the following LAMBDA call and its output:
=LAMBDA(data,
LET(
filteredData, FILTER(data, data >=10),
ComputedData, MAP(filteredData, LAMBDA(r,compute(r))),
ComputedData
)
)({5,12,8,15,10,20})
Output:
145226101401
This output shows you the result of the LAMBDA call, which includes four calls of compute based on the number of elements in the input set. In this case, it's 6. Based on the input/output behavior of compute, find the body of compute.
The function compute uses the signature LAMBDA(r,BODY), where r is the parameter passed and BODY must be the simplest and shortest implementation of the function compute. Don't use any blanks in the implementation. Test your solution with Excel.
To answer this question successfully you need to know how: LAMBDA works with formal arguments, actual arguments, how the body is executed, the functions appearing inside LAMBDA(i.e., FILTER, MAP), and the usage of arithmetic operators.

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!