The Return Object

The Return object allows you to abort the processing of a function. The function will return the null object (not the Return object) in this case.

Here's an example:

So this function will return null for any expression that has the form "a/b". Applied to an expression of any other form, the function will first call Test1, if that function returns null, then it will call Test2.

If a clause returns the Return object, the execution of the clauses of the function is terminated and the function returns the null object.

It's important to recognize that we can't write the first clause as

because when a clause returns the null object, processing just falls through to the next clause. Using the Return object prevents the second and third clause for being executed.