Adds functionality for set-nth.