diff --git a/MoreLinq.Test/FillBackwardTest.cs b/MoreLinq.Test/FillBackwardTest.cs index 0e5ccfc78..337cf2300 100644 --- a/MoreLinq.Test/FillBackwardTest.cs +++ b/MoreLinq.Test/FillBackwardTest.cs @@ -82,7 +82,7 @@ public void FillBackwardWithFillSelector() var result = xs.Select(x => new { X = x, Y = x }) - .FillBackward(e => e.X == 0, (nm, m) => new { m.X, nm.Y }); + .FillBackward(e => e.X == 0, (m, nm) => new { m.X, nm.Y }); Assert.That(result, Is.EquivalentTo(new[] { diff --git a/MoreLinq.Test/FillForwardTest.cs b/MoreLinq.Test/FillForwardTest.cs index 1493c67f5..a83e5277b 100644 --- a/MoreLinq.Test/FillForwardTest.cs +++ b/MoreLinq.Test/FillForwardTest.cs @@ -99,8 +99,8 @@ select line.Trim() into line Value = int.Parse(val), }); - data = data.FillForward(e => e.Continent == "-", (f, e) => new { f.Continent, e.Country, e.City, e.Value }) - .FillForward(e => e.Country == "-", (f, e) => new { e.Continent, f.Country, e.City, e.Value }); + data = data.FillForward(e => e.Continent == "-", (e, f) => new { f.Continent, e.Country, e.City, e.Value }) + .FillForward(e => e.Country == "-", (e, f) => new { e.Continent, f.Country, e.City, e.Value }); Assert.That(data, Is.EquivalentTo(new[] diff --git a/MoreLinq/FillBackward.cs b/MoreLinq/FillBackward.cs index 0f4076557..addf1f079 100644 --- a/MoreLinq/FillBackward.cs +++ b/MoreLinq/FillBackward.cs @@ -119,7 +119,7 @@ static IEnumerable FillBackwardImpl(IEnumerable source, Func p foreach (var blank in blanks) { yield return fillSelector != null - ? fillSelector(item, blank) + ? fillSelector(blank, item) : item; } diff --git a/MoreLinq/FillForward.cs b/MoreLinq/FillForward.cs index 7315fca8c..1200afa6c 100644 --- a/MoreLinq/FillForward.cs +++ b/MoreLinq/FillForward.cs @@ -114,7 +114,7 @@ static IEnumerable FillForwardImpl(IEnumerable source, Func pr { yield return seeded ? fillSelector != null - ? fillSelector(seed, item) + ? fillSelector(item, seed) : seed : item; }