Question: extracting of a list (A) elements using indexes saved in another list (B)

Hi,

I need to do this:

A:=[1,3,5,2,7];
B:=[2,5];

f(B,A)=[3,7]

Notice that the elements in A can be lists themselves. How can I define such kind of function?

TIA for the help

Please Wait...