top-level-nlx.lisp 443 Bytes
Newer Older
ram's avatar
ram committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
(let ((count 0))
  (block crock
    (defun test (x)
      (if x
	  (return-from crock (values 2 2))
	  (print 'yow!)))
    (test nil)
    (defun increment ()
      (incf count))
    (unwind-protect
	(test t)
      (print "Unwound."))))

(catch 'goo
  (unwind-protect
      (throw 'goo nil)
    (print "Unwound.")))

(collect ((stuff))
  (dotimes (i 10)
    (stuff #'(lambda (x)
	       (when x (return i)))))
  (defparameter *stuff* (stuff)))