[#470] Add `GET n` instruction
Description
This MR introduces the new GET n
instruction.
GET ix
gets the node at index ix
of a right-combed pair.
Nodes are 0-indexed, and are numbered in a breadth-first, left-to-right fashion.
For example, a pair with 3 elements @pair a b c@ will be represented as a tree with 5 nodes:
pair
/ \
a pair
/ \
b c
Where the nodes are numbered as follows:
0
/ \
1 2
/ \
3 4
Related issue(s)
Resolves part of #470 (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.