`subst` now replaces function parameters as well

Closes #2