using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
Func<Func<int,int>,IEnumerable<int>,IEnumerable<int>,IEnumerable<int>> function = (f,L,I)=>L.Select((v,i)=>I.Contains(i+1)?f(v):v);
Func<int,int> f1 = x => x*x;
int[] L1 = new int[] {14, 14, 5, 15, 15, 10, 13, 9, 3 };
int[] I1 = new int[] {1, 3, 4, 5, 6, 7};
int[] expected1 = new int[] {196, 14, 25, 225, 225, 100, 169, 9, 3};
bool result1 = function(f1,L1,I1).SequenceEqual(expected1);
Console.WriteLine(result1);
Func<int,int> f2 = x => x+1;
int[] L2 = new int[] {7, 12, 14, 6};
int[] I2 = new int[] {1, 2, 3, 4};
int[] expected2 = new int[] {8, 13, 15, 7};
bool result2 = function(f2,L2,I2).SequenceEqual(expected2);
Console.WriteLine(result2);