Question: Write a Eventlang program that declares an event, CountDown, that accepts a single context variable, n. Register a handler with this event such that when
Write a Eventlang program that declares an event, CountDown, that accepts a single context variable, n. Register a handler with this event such that when the event is announced with the number n as the payload, the handler prints the number n and announces another event, CountDown with n-1, as the payload. This handler terminates the countdown when n is 0.
Step by Step Solution
3.44 Rating (151 Votes )
There are 3 Steps involved in it
Heres an example of an Eventlang program that declares an event CountDown registers a handler and in... View full answer
Get step-by-step solutions from verified subject matter experts
