@Override
    public void apply(final Traversal.Admin<?, ?> traversal) {
        for (final Step<?, ?> step : traversal.getSteps()) {
            if ((step instanceof LambdaHolder || step instanceof ComparatorHolder) && step.toString().contains("lambda"))
                throw new VerificationException("The provided traversal contains a lambda step: " + step, traversal);
        }
    }
{@code LambdaRestrictionStrategy} does not allow lambdas to be used in a {@link Traversal}. The contents of a lambda
cannot be analyzed/optimized and thus, reduces the ability of other {@link TraversalStrategy} instances to reason
about the traversal. This strategy is not activated by default. However, graph system providers may choose to make
this a default strategy in order to ensure their respective strategies are better able to operate.
<p/>

@author Marko A. Rodriguez (http://markorodriguez.com)
@example <pre>
__.out().map(v -&gt; v.get().value("name"))           // throws an IllegalStateException
__.out().filter(v -&gt; v.bulk() &gt; 2)              // throws an IllegalStateException
__.choose(v -&gt; v.sack() == 1,out(),in())           // throws an IllegalStateException
__.select().by(v -&gt; v.get().id())                  // throws an IllegalStateException
__.order().by(a,b -&gt; a &gt; b)                        // throws an IllegalStateException
</pre>
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/LambdaRestrictionStrategy.java