protected override Expression VisitMethodCall(MethodCallExpression node) { if (node.Method.IsGenericMethod && InlineApplyVisitor.ApplyMethods.Contains(node.Method.GetGenericMethodDefinition())) { return(ExpressionExtensions.Apply(MaybeExtension.GetOrThrow <LambdaExpression, Exception>(MaybeExtension.Bind <object, LambdaExpression>(Evaluator.SimpleEval(node.Arguments[0]), (Func <object, Maybe <LambdaExpression> >)(x => MaybeExtension.MaybeAs <LambdaExpression>(x, true))), (Func <Exception>)(() => new Exception("Could not Simplify expression " + (object)node))), Enumerable.Skip <Expression>((IEnumerable <Expression>)node.Arguments, 1))); } else { return(base.VisitMethodCall(node)); } }