Skip to content

[#470] Add `UPDATE n`

Diogo Castro requested to merge diogo/#470-update-n into master

Description

This MR introduces the new UPDATE n instruction (named pairUpdate in Lorentz).

  • allows updating the node a right-combed pair at index n
  • like GET 0, UPDATE 0 works even on non-pair values (and is equivalent to DIP { DROP })

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

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Diogo Castro

Merge request reports