These functions are only used once and do not save time. Both functions iterate over the whole list just to prevent iterating over the whole list if they return false. As traversing the list is required in any case, these functions can be removed.