CL-USER> (defun bar (x)
(if (eq x 3) (return)))
BAR
CL-USER> (defun foo ()
(dotimes (i 10)
(format t "~a~%" i)
(bar i)))
FOO
CL-USER> (foo)
0
1
2
3
*** Error: RETURN-FROM: no block named NIL is currently visible
uLisp just stops, no error.
If the goal is to adhere to Common Lisp, this should be fixed. But I frankly like this behavior, because it allows you to define your own "exit" functions that can make decisions, do custom cleanup, etc. and then exit the loop even if it is farther up the call stack.
uLisp just stops, no error.
If the goal is to adhere to Common Lisp, this should be fixed. But I frankly like this behavior, because it allows you to define your own "exit" functions that can make decisions, do custom cleanup, etc. and then exit the loop even if it is farther up the call stack.