Permalink
Browse files

Added AIF macro

  • Loading branch information...
1 parent 77d2543 commit fd0ce0aa440f9661fe0c96e76b289cca2359ca43 @adlai committed Sep 1, 2009
Showing with 5 additions and 1 deletion.
  1. +1 −1 src/package.lisp
  2. +4 −0 src/utils.lisp
View
@@ -2,7 +2,7 @@
(defpackage :Eos
(:use :common-lisp :it.bese.arnesi)
- (:shadow #:ensure-list #:with-unique-names #:list-match-case)
+ (:shadow #:ensure-list #:aif #:with-unique-names #:list-match-case)
(:export ;; creating tests and test-suites
#:make-suite
#:def-suite
View
@@ -10,6 +10,10 @@
(let ((parameter (intern "_")))
`(lambda (,parameter) (declare (ignorable ,parameter)) ,@body)))
+(defmacro aif (test true &optional false)
+ `(let ((it ,test))
+ (if it ,true ,false)))
+
;;; This is taken from Arnesi's src/one-liners.lisp, and implements a
;;; more sophisticated version of PCL's WITH-GENSYMS.

0 comments on commit fd0ce0a

Please sign in to comment.