I think that CancelAlarm should return true if the alarm value was in the alarm set (and it thus subsequently tried to remove it) and false otherwise, and that the code in 1.9 AddAlarm should be slightly refactored to read
if CancelAlarm(...) then
Perform ! Call(alarmFn, ...)
This is only for readability: it means that alarms are always removed by CancelAlarm.
I think that CancelAlarm should return true if the alarm value was in the alarm set (and it thus subsequently tried to remove it) and false otherwise, and that the code in 1.9 AddAlarm should be slightly refactored to read
This is only for readability: it means that alarms are always removed by CancelAlarm.