namespace StandardOperators;

public static class WholeSequenceOrderPreserving
{
    public static void CombiningWithZip()
    {
        string[] firstNames = { "Jan", "Edward", "Artur", "Artur" };
        string[] lastNames = { "Kowalski", "Janiak", "Zieliński", "Wielicki" };

        IEnumerable<string> fullNames = firstNames.Zip(lastNames,
            (first, last) => first + " " + last);
        foreach (string name in fullNames)
        {
            Console.WriteLine(name);
        }
    }
}