In mammals, the organ which performs digestive and endocrine functions is the