def tail_recurse(prev, curr):
    """
    Using tail recursion, reverses the linked list starting at curr, then joins
    the end of this linked list to the linked list starting at prev.
    """
    if curr:
        new_curr = curr.next_node
        if new_curr:
            curr.next_node = prev
            return tail_recurse(curr, new_curr)
        # We've reached the end.
        curr.next_node = prev
        return curr
    return None