You will need to submit a proposal which indicates the concrete syntax and operational semantics for the feature, and once it is approved, modify the appropriate interpreter to implement it. The Scheme interpreters we have been using have involved a character-string parser which is too bulky and confusing to try and modify. We have defined functions, such as factorial , which are not defined for all possible values of the input type.
Many languages allow functions to raise an exception , alerting the caller that something is wrong.
The body of the let attempts to call divide with arguments x and y . If y is 0, the call to divide will raise the exception DivByZero , and the expression in the appropriate clause of the handle expression will be evaluated. Usually if no clause matches, the correct behavior is to raise the same exception. Exception handlers in functional programming languages. Shaula Yemini and Daniel M. Berry.