3 ms·
If you're using the loop macro, you can do it from Common Lisp (see [0]). (block outer (loop for i from 0 return 100) ; 100 returned from LOOP (print
by joshmarlow 9y ago
If you're using the loop macro, you can do it from Common Lisp (see [0]).
(block outer
(loop for i from 0 return 100) ; 100 returned from LOOP
(print "This will print")
200) ==> 200
(block outer
(loop for i from 0 do (return-from outer 100)) ; 100 returned from BLOCK
(print "This won't print")
200) ==> 100
[0] - http://www.gigamonkeys.com/book/loop-for-black-belts.html http://www.gigamonkeys.com/book/loop-for-black-belts.html
EDIT: I always do formatting wrong on here.