GitHub user okram opened a pull request:
TINKERPOP-1508: Add choose(predicate,trueTraversal)
Added `GraphTraversal.choose(predicate,traversal)` and `GraphTraversal.choose(traversal,traversal)`. These are implemented as `choose(traversal,identity())`. Up to this point, `choose()` has been if/then/else-semantics and now with addition, we have if/then-semantics.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop
Alternatively you can review and apply these changes as the patch at:
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #472
Author: Marko A. Rodriguez <firstname.lastname@example.org>
added choose(predicate,traversal) which is a map to choose(predicate,traversal,identity()) and gives us if/then-semantics instead of always requiring if/then/else-semantics.