Move the tail function to the makelist function, since it logically makes more
sense to put that there, and it composes relatively easily.