complete
which takes two arguments value
and amount
, respectively of type string
and int
:called by
refuse transfer
require
specification
effect
complete
action example may be enhanced as follows:r : ...
line 8 above, r
is a label for the require expression (see Label section below).require {
enough_transfer : transferred > threshold
}
failif {
not_enough_transfer : transferred <= threshold
}
p
is the value of amount
.require
expression fails if the condition is not met:failif
expression fails if the condition is met:car.get (vid)
car.add ({ vin = "1GNEK13ZX3R298984"; model = "Bugatti Chiron"; year = 2018 })
car.remove (vid)
car.update ("1GNEK13ZX3R298984", {year = 2019})
car.nth (i)
(an asset collection is sorted)car.count ()
car.sum (year)
car.select (year >= 2019)
car.sort (year)