A function may have more free vars than it does parameters in the case that the user wants an uncaptured var to appear in the resulting term. For example, consider if the user wants to replace the term "f(x)" with the term "f(x + var 0)". I added tests to cover previous bug and to show desire for having free vars beyond # of parameters. Note this is also in line with current specification in .mli file.
Previous discussion:
https://github.com/zkincaid/duet/pull/20#discussion_r550509824 https://github.com/zkincaid/duet/pull/20#discussion_r550578419
A function may have more free vars than it does parameters in the case that the user wants an uncaptured var to appear in the resulting term. For example, consider if the user wants to replace the term "f(x)" with the term "f(x + var 0)". I added tests to cover previous bug and to show desire for having free vars beyond # of parameters. Note this is also in line with current specification in .mli file.