How do I compose Linq Expressions? ie Func<Exp<Func<X, Y>>, Exp<Func<Y, Z>>, Exp<Func<X, Z>>>
问题 I'm creating a Validator<T> class. I'm attempting to implement the Linq SelectMany extension methods for my validator to be able to compose expressions using a Linq query and validate the final result even when the underlying values change. The following test code demonstrates my intent. var a = 2; var b = 3; var va = Validator.Create(() => a, n => n >= 0 && n < 5); var vb = Validator.Create(() => b, n => n >= 0 && n < 5); var vc = from ia in va from ib in vb select ia + ib; Debug.Assert(vc