sicp-ex-3.31



<< Previous exercise (3.30) | Index | Next exercise (3.32) >>


For our event-driven system, it needs an change in bit of a wire to trigger an action (invert, or, add, etc). However, when all the wires are initialized to 0, no actions will be triggered. Therefore we need to trigger those actions manually during the initialization stage.

sam

we use add-action in our function element definitions. If we don't initialize; the time when this function element is inserted in the system will not be recorded on the agenda. Then it is possible, when agenda is simulated via propagate, the function element will not be simulated at all.