I am constructing a function that would take an array(list) as its argument(input) and returns another array. On calling the function the code shows a warning and returns null. The warning says “Converting an array to var would cause array rank reduction and is not permitted”.
However, the same function works fine if only one single element is given as a return. I am attaching screenshots of the function for reference. Can someone tell me what is wrong?