kw undo
Reserved keyword
The list of words: §1.4
Syntax
SStep = Expr [ "undo" Lambda ] ;Grammar: App. A
Defined in
- 11.3 Sagas — A saga is a sequence of steps (the step syntax is as in a chain, §8.4); after a step there MAY be undo x => compensation, where x is the res
- 1.2 Statement termination — A statement is terminated by ; or by a line break.
- 1.4 Keywords — Reserved (cannot be used as names)
Examples
saga checkout(cart: Cart) -> Order {
Inventory.reserve(cart) undo r => Inventory.release(r.id)
-> Payments.charge(cart.total) undo p => Payments.refund(p.id)
-> Orders.create(cart, it)
}