Set the nth element in a list.
Address code review comments.
Merge branch 'set-nth'