using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
var list = new List<int> { 1, 2, 3, 4, 5 };
var list2 = list.M(x => x*x);
Console.WriteLine(list2.Last());
}
public static class Fun
public static IEnumerable<T> M<T>(this IEnumerable<T> ts, Func<T,T> f)
return ts.Select(f);