Creates the list from the builder.
The function receives appendToHead and currentList and returns the appended list.
appendToHead
currentList
The built list.
Creates the list from the builder.