Designing a recursive "insert at tail of list" algorithm