Description
choose() supports choose(predicateTraversal,trueTraversal,falseTraversal).
I have lots of code that does this:
choose(blah(), bloop(), identity())
That is, if the predicate traversal doesn't hold, I simply want the incoming traverser to be emitted – identity(). This is sort of like optional(), but the predicate is something different from the branch. It would be nice to be able to simply say:
choose(blah(),bloop())
...where its understood that a "false" means identity().
Attachments
Issue Links
- links to