private static Maybe <QueryPlan> Op(Maybe <QueryPlan> left, Maybe <QueryPlan> right, Operation operation)
        {
            if (left.HasValue && right.HasValue)
            {
                switch (operation)
                {
                case Operation.And:
                    return(Maybe.Return(QueryPlan.And(left.Value, right.Value)));

                case Operation.Or:
                    return(Maybe.Return(QueryPlan.Or(left.Value, right.Value)));

                default:
                    throw new ArgumentException("{0} is not supported.".Fmt(operation));
                }
            }
            return(left.HasValue ? left : right);
        }