Guest User

Untitled

a guest
Jun 13th, 2019
96
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. (defmacro named-let (name bindings &body body)
  3. `(labels ((,name ,(mapcar (lambda (x) (if (listp x) (first x) x)) bindings)
  4. ,@body))
  5. (,name ,@(mapcar (lambda (x) (if (listp x) (second x) nil)) bindings))))
  6.  
  7. ;; (named-let fact ((n 10))
  8. ;; (if (< n 1) 1 (* n (fact (1- n)))))
  9. ;; --> 3628800
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×