# failed.ex -rw-r--r-- 381 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
def recipes do
  ingredients = Ingredients.ingredients()
  get_ingredient = &Keyword.get(ingredients, &1, raise "#{&1} not found in ingredients")
  
  create_recipe("salted cheese")
  |> add_ingredient_quantity(get_ingredient.(:cheese), "2 oz")
  |> add_ingredient_quantity(get_ingredient.(:salt), "1 teaspoon")
  |> add_ingredient_quantity(get_ingredient.(:water), "1 quart") 
end