Alerts

Alerts might not be the most pleasant form of interaction with a Scheem program, but they can be helpful when debugging. Let's implement alert, making sure to implement it as a pre-defined function value rather than a special form.

For Node.js, have the implementation log a value to the console for debugging. On the web do a real alert.

Test your function with:

Add a function alert that pops up a JavaScript alert showing a Scheem value. Note that (alert expr) evaluates expr before showing the alert.



Prev Next