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.
Is there a way I can exit proc or function in mozart oz
103 views Asked by Haotian Song At
1
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.