`nth` now uses a path expression

This allows code like `(= :foo (nth x 5))` to refine the type of `x`.