public void BasicExperiment() { IEnumerable<int> xs = new[] { 1, 2, 3, 4 }; IEnumerable<int> ys = new[] { 5, 6, 7, 8 }; IEnumerable<int> zs = new[] { 2, 3, 4, 5 }; IEnumerable<int> query = xs.AsOperational() + ys - zs; query.ForEach(ConsoleOutput); }
public void EqualityComparisonExperiment() { var a = new object(); var b = new object(); var c = new object(); IEnumerable<object> xs = new[] { a, c, b, c, b, a }; IEnumerable<object> ys = new[] { a, b, c, c, b, c }; IEnumerable<object> zs = new[] { c, a, b, a, a, c }; IEnumerable<bool> query = xs.AsOperational() == ys | zs.AsOperational() == b; query.ForEach(ConsoleOutput); }
public void ComparisonExperiment() { IEnumerable<int> xs = new[] { 1, 4, 7, 5, 6, 3, 3 }; IEnumerable<int> ys = new[] { 2, 5, 8, 1, 6, 4, 4 }; IEnumerable<int> zs = new[] { 3, 6, 4, 5, 8, 2, 6 }; IEnumerable<bool> query = xs.AsOperational() < ys & zs.AsOperational() >= 5; query.ForEach(ConsoleOutput); }