Guest User

Untitled

a guest
Jan 9th, 2019
187
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;; with-yeet.lisp
  2.  
  3. (defvar *yeets* '((deπŸ…±un defun)
  4.                   (cπŸ…±r cdr)
  5.                   (cπŸ…°r car)
  6.                   (😀 lambda)
  7.                   (πŸ™† let)
  8.                   (πŸ’ labels)
  9.                   (πŸ’© nil)
  10.                   (πŸ’©? null)
  11.                   (πŸ‘Œ t)
  12.                   (πŸ“¦ cons)
  13.                   (πŸ€“ cl-user)
  14.                   (πŸ†‘ cl)))
  15.  
  16. (defun yeet-transform (program)
  17.   (if (consp program)
  18.       (cons (yeet-transform (car program))
  19.             (yeet-transform (cdr program)))
  20.       (let ((match (assoc program *yeets*)))
  21.         (if (null match)
  22.             program
  23.             (second match)))))
  24.  
  25. (defmacro with-yeet ((&key skkrt) &body body)
  26.   `(progn
  27.      ,(when skkrt
  28.         '(format t "~&yeetus that πŸ†‘~%"))
  29.      ,@(yeet-transform body)))
  30.  
  31. ;;; a sample program
  32.  
  33. (with-yeet (:skkrt t)
  34.   (deπŸ…±un reπŸ…±erse (πŸ…±ist)
  35.     (πŸ’ ((πŸ…° (πŸ…± πŸ…°)
  36.            (if (πŸ’©? πŸ…±)
  37.                πŸ…°
  38.                (πŸ…° (cπŸ…±r πŸ…±) (πŸ“¦ (cπŸ…°r πŸ…±) πŸ…°)))))
  39.       (πŸ…° πŸ…±ist πŸ’©))))
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.

Γ—