Commit Graph

3 Commits

Author SHA1 Message Date
Chris Penner
5ca1eb3b8d Replace '.' references with scratch/main 2024-06-25 11:11:07 -07:00
Dan Doel
bc7d5386ef Some tweaks and an improved test case
- visit_ was producing problematic results, because it visits every
  subexpression. This means that for:

    f x y z

  it visits all of:

    f x y z, f x y, f x, f

  But, if we take prefixes for all of those, we'll always end up
  eliminating only one variable, even if more are redundant.
- Instead of the above, use `visit` with a recursive procedure. This
  requires some other modifications, because we need to manually recurse
  into arguments of applied functions that aren't variables.
- Added a test case for the above trickiness
- Prefix should have been a newtype
2022-11-02 11:21:36 -04:00
Dan Doel
100947daa6 Test case 2022-11-02 10:39:35 -04:00