Parse records and keyed collection queries
This commit is contained in:
11 files changed
+324
-4
No files matched your search
@@ -0,0 +1,13 @@
|
||||
type order = {
|
||||
customer : string;
|
||||
total : int;
|
||||
}
|
||||
|
||||
input orders : collection order
|
||||
|
||||
let tax n = n * 20 / 100
|
||||
|
||||
query expensive_orders =
|
||||
orders
|
||||
|> filter (fun o -> o.total > 1000)
|
||||
|> map (fun o -> (o.customer, tax o.total))
|
||||
Reference in new issue
Block a user