Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added AIF macro

  • Loading branch information...
commit fd0ce0aa440f9661fe0c96e76b289cca2359ca43 1 parent 77d2543
@adlai authored
Showing with 5 additions and 1 deletion.
  1. +1 −1  src/package.lisp
  2. +4 −0 src/utils.lisp
View
2  src/package.lisp
@@ -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
4 src/utils.lisp
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.