[lang-ref] ( map_with_lambda ) ( csharp )

[Fact]
public void TestMapWithLambda()
{
    // items.Select(x => ..)
    List<int> items = new() { 1, 2, 3 };
    List<int> expected = new() { 2, 4, 6 };

    List<int> actual = items.Select(x => x * 2).ToList();

    Assert.Equal(expected, actual);
}