This looks good to me! It's a shame we can't get the collapsing to work easily, but I suppose the library doesn't do any sort of other collapsing (e.g. ((), x) == x), so it would have been a pretty big "feature" anyway... Still, this is definitely more than enough to solve our problems!
Thanks for looking into this! It has been a fun exercise 🙂
This looks good to me! It's a shame we can't get the collapsing to work easily, but I suppose the library doesn't do any sort of other collapsing (e.g.
((), x) == x
), so it would have been a pretty big "feature" anyway... Still, this is definitely more than enough to solve our problems!Thanks for looking into this! It has been a fun exercise 🙂