Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [<Measure>] type L // litres
- [<Measure>] type KG // Kilograms
- type Ingredient<[<Measure>] 'u> =
- | BaseIngredient of string * float<'u> * float * decimal // name, Unit Of Measure, qty, kg/UOM, price/UOM
- type IceCreamBaseBatch<[<Measure>] 'u> =
- | IceCreamBaseMix of Ingredient<'u> * Ingredient<'u> * Ingredient<'u> // Ice Cream Base Batch is made up of 3 ingredients
- type BananaIceCreamBatch<[<Measure>] 'u> =
- | IceCreamBase of int * IceCreamBaseBatch<'u> // to use as 1x Ice Cream Base Batch
- // | Ld of string * decimal * BananaIceCreamBatch List
- let OneMilk = BaseIngredient("Milk", 5.0<L>, 1.1, 2.00m)
- let OneCream = BaseIngredient("Cream", 0.5<L>, 1.2, 5.00m)
- let OneSugar = BaseIngredient("Sugar", 0.4<KG>, 1.0, 4.00m)
- //let OneIceCreamBase = // ??
Add Comment
Please, Sign In to add comment