Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.32 KB | None | 0 0
  1. (defmacro when (condition &body body)
  2.   (let ((forced-condition (gensym "FORCED-CONDITION")))
  3.     `(let ((,forced-condition ,condition))
  4.        (funcall
  5.         (catch ,forced-condition
  6.           (catch 'nil
  7.             (throw ,forced-condition
  8.                    (lambda () ,@body)))
  9.           (lambda () nil))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement