Returns true if the given function returns true for all items in the list.
If the list is empty, returns true.