Is there a way I can exit proc or function in mozart oz

76 views Asked by At

I am trying to do a recursion proc in mozart oz, is there a way I can exit the proc or function when I get my answer so that the rest recursion will not continue.

1

There are 1 answers

1
wmeyer On

You could use an exception for that.

But usually, the recursive call is at the end of a function anyway. Just returning will automatically go up the stack.