In other words, can these lines be combined?
Func<int, int> square = x => x * x; Console.WriteLine(square(5)); There is no recursion here - I'm not looking for Y combinator, but rather just immediately using the function I defined.
I tried something like this - but could not get around syntax errors
Console.WriteLine( // defining the function inline (new Func<List<int>, string>(list) => string.Join(",", list)) (new List<int>{1,2,3}) // immediately passing the parameter );