(* acct.sig *) (* bank accounts with a non-negative integer balances *) signature ACCT = sig (* type of bank accounts *) type acct (* create a bank account with a balance of 0 *) val make : unit -> acct (* exception raised when argument is non-positive *) exception NonPositive (* if n <= 0, then incEvt(acct, n) raises NonPositive otherwise, incEvt(acct, n) returns an event that, when synchronized with, increments acct's current balance by n *) val incEvt : acct * int -> unit CML.event (* if n <= 0, then decEvt(acct, n) raises NonPositive otherwise, decEvt(acct, n) returns an event that, when synchronized with, which is only possible if acct's balance is at least n, decrements acct's balance by n *) val decEvt : acct * int -> unit CML.event end;