Adds functionality for set-nth.

Issue #578 
Sure. Don't know how that got there honestly.