Pergunta de entrevista da empresa Dgraph Labs

Round 3: Given an array and a function (that needs to be applied to each element of the array) as input. What is the fastest way to apply that function on to the array and return the new array?