Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Introduced &IGN for ignored variables.

Used to be NIL, this is an incompatible change.  Rationale: otherwise
I would have to parse deconstructing lambda forms to distinguish from
other uses of NIL.
  • Loading branch information...
commit 5793b8cbfc58b269a2c60034f8961cae338d1f1c 1 parent 31b9b83
@tpapp authored
Showing with 13 additions and 13 deletions.
  1. +1 −1  let-plus.lisp
  2. +9 −9 package.lisp
  3. +3 −3 tests.lisp
View
2  let-plus.lisp
@@ -6,7 +6,7 @@
(defun ignored? (symbol)
"Return a boolean determining if a variable is to be ignored."
- (not symbol))
+ (eq symbol '&ign))
(defun replace-ignored (tree)
"Replace ignored variables in TREE with a gensym, return a list of these as
View
18 package.lisp
@@ -2,22 +2,22 @@
(defpackage let-plus
(:use cl alexandria anaphora)
- (:export
-
+ (:export
+
;; basic user interface
-
+
let+
-
- &accessors &accessors-r/o &slots &slots-r/o &structure &structure-r/o
+
+
+ #:&ign &accessors &accessors-r/o &slots &slots-r/o &structure &structure-r/o
&values &array-elements &array-elements-r/o &flet &labels &macrolet
&symbol-macrolet &plist &plist-r/o &hash-table &hash-table-r/o
;; defining new forms
-
+
let+-expansion let+-expansion-for-list define-let+-expansion
;; extensions
-
- &flet+ &labels+ lambda+ defun+ define-structure-let+ &fwrap &assert
- &once-only &with-gensyms &complex))
+ &flet+ &labels+ lambda+ defun+ define-structure-let+ &fwrap &assert
+ &once-only &with-gensyms &complex))
View
6 tests.lisp
@@ -81,20 +81,20 @@ should)."
(addtest (let-plus-tests)
test-values
- (let+ (((&values a nil c) (values 1 2 3)))
+ (let+ (((&values a &ign c) (values 1 2 3)))
(ensure-same a 1)
(ensure-same c 3)))
(addtest (let-plus-tests)
test-values-recursive
- (let+ (((&values (a b) nil c) (values '(1 4) 2 3)))
+ (let+ (((&values (a b) &ign c) (values '(1 4) 2 3)))
(ensure-same a 1)
(ensure-same b 4)
(ensure-same c 3)))
(addtest (let-plus-tests)
test-array
- (let+ ((#2A((a nil) (b c)) #2A((1 2) (3 4))))
+ (let+ ((#2A((a &ign) (b c)) #2A((1 2) (3 4))))
(ensure-same a 1)
(ensure-same b 3)
(ensure-same c 4))
Please sign in to comment.
Something went wrong with that request. Please try again.