| Safe Haskell | Safe-Inferred |
|---|
Data.Nutrition.Food
Documentation
The Food data type consists of four things:
-
foodnameA name of the food. -
macrosThe macro nutrients of that specific food-item. -
caloriesA calculated caloric value saved in kilo calories. -
amountThe amount of the actual food.
(.@) :: Weight -> (Weight -> Food) -> FoodSource
A simple operator so one can write the Weight value prefix to
the food.
kcal takes a food item and gives back the kilo-caloric value. This value is calculated from the macro-nutrition values.
foodGenerator :: String -> (Protein, Carb, Fat) -> Weight -> FoodSource
This function is a smart constructor to construct a food
item. If no Weight is supplied, a food generating function for a
specific food item is returned.