jq icon indicating copy to clipboard operation
jq copied to clipboard

#618 alternative to dupn

Open leonid-s-usov opened this issue 4 years ago • 1 comments

@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.

leonid-s-usov avatar Feb 11 '20 00:02 leonid-s-usov

Coverage Status

Coverage decreased (-0.4%) to 84.075% when pulling 145848f7a97a25675593e7f6e14ebc20a4f0e31b on leonid-s-usov:618-alternative-to-DUPN into 5b9e63e4af339bc5867603f14441b4b4cbb9e175 on stedolan:master.

coveralls avatar Feb 11 '20 00:02 coveralls