-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecipes.elm
51 lines (37 loc) · 904 Bytes
/
Recipes.elm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
module Recipes exposing (..)
type IngredientType
= NoIngredient
| Carrots
| Beans
| Bread
| Sheeps_Butter
type Product
= BeanSalad
type alias Ingredient =
{ ingredientType : IngredientType
, amountNeeded : Int
}
type alias Recipe =
{ ingredient1 : Maybe Ingredient
, ingredient2 : Maybe Ingredient
, ingredient3 : Maybe Ingredient
, ingredient4 : Maybe Ingredient
, product : Product
}
allProducts : List Product
allProducts =
[ BeanSalad
]
noIngredient : Ingredient
noIngredient =
{ ingredientType = NoIngredient
, amountNeeded = 0
}
beanSaladRecipe : Recipe
beanSaladRecipe =
{ ingredient1 = Just { ingredientType = Beans, amountNeeded = 16 }
, ingredient2 = Just { ingredientType = Carrots, amountNeeded = 16 }
, ingredient3 = Nothing
, ingredient4 = Nothing
, product = BeanSalad
}