Safe Haskell | Safe-Inferred |
---|
Documentation
The Food data type consists of four things:
-
foodname
A name of the food. -
macros
The macro nutrients of that specific food-item. -
calories
A calculated caloric value saved in kilo calories. -
amount
The 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.