jq
jq copied to clipboard
#618 alternative to dupn
@wtlangford @nicowilliams It's old, I know, but why not?
Following my comments at #618 I am proving here my points.
The suggested FORK_1N
would need to pop/push for the first time and then produce null
after backtrack, so that the second branch has some input to consume. Hence a small change in the proposed naming.
Or, alternatively, we could introduce at least one instruction which produces value but doesn't consume one. This would come in handy in many places - maybe some kind of a modifier for existing opcodes. Just saying...
All tests pass.