Hume (programming language): Difference between revisions

Content deleted Content added
Vending machine: name clash correction
Line 53:
match
-- * wildcards for unfilled outputs, and unconsumed inputs
( coinmy_coin, *, v) {- ''join-pattern'' equivalent'': coins(coin(my_coin) & value(v) -}
-> let v’ = incrementCredit coinmy_coin v
in ( *, v’, *, show v’)
-- time bounding (''within x time-unit'') raises TimeOut ()
| ( *, BCoffee, v) {- ''join-pattern equivalent'' equivalent: buttonsbutton(BCoffee) & value(v) -}
-> (vend Coffee 10 v) within 30s
| ( *, BTea, v) -> (vend Tea 5 v) within 30s