[#359] Turn `unpair` into standalone instruction
Description
NOTE: at the moment, this MR is based on top of !825 (merged)
- Added new
UNPAIR
instruction - Renamed the
UNPAIR
macro toUNPAPAIR
- Updated macro expansion: expand
UNPAPAIR
macros toUNPAIR
instructions.
Added optimizer rules:
- Optimize
DUP; CAR; DIP { CDR }
toUNPAIR
- Optimize
DUP; CDR; DIP { CAR }
toUNPAIR; SWAP
Also added a quality-of-life-improvement, to make it easier to write optimizer rules:
- The
Seq
constructor can now be used as a right-associative operator.
Related issue(s)
Resolves #359 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Diogo Castro