Add aif, for clisp.
authorFrancois-Rene Rideau <tunes@google.com>
Thu, 25 Oct 2012 00:18:41 +0000 (09:18 +0900)
committerFrancois-Rene Rideau <tunes@google.com>
Thu, 25 Oct 2012 00:18:41 +0000 (09:18 +0900)
utils.lisp

index d619232..ea74626 100644 (file)
@@ -390,6 +390,10 @@ Host, device and version components are taken from DEFAULTS."
                  ;; scheme-specific parts: port username password, not others:
                  . #.(or #+scl '(:parameters nil :query nil :fragment nil))))
 
+(defmacro aif (test then &optional else)
+  "Anaphoric version of IF, On Lisp style"
+  `(let ((it ,test)) (if it ,then ,else)))
+
 (defun* probe-file* (p)
   "when given a pathname P, probes the filesystem for a file or directory
 with given pathname and if it exists return its truename."