Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Item = string
- type Quantity = string * decimal
- type Ingredient =
- | Raw of Item * Quantity
- | Cooked of Recipe * Quantity
- type Recipe = {
- mix: Ingredient list
- prep: Preparation list
- }
- with static member Default = {mix = []; prep = []}
- let ``goat curry`` =
- let addIngredient i container = {container with mix = container.mix |> List.append i}
- Recipe.Default
- |> addIngredient Raw("oil", ("cup", 0.25))
- |> addIngredient Raw("curry powder", ("tablespoon", 8))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement