The function of carbohydrates is