-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* finally removed the long deprecated *bind-treat-values-as-values* * added :labels to complement :flet and fixed :flet to accept an optional declaration form (coincidently noticed by me and https://github.com/scymtym in the same week!) * fixed bug where the array binding form wasn't correctly handling underscore as ignore * added tests for flet with declarations, labels and handling underscore as ignore (only some binding forms are checked so I should write some more...)
- Loading branch information
Gary King
committed
Feb 12, 2011
1 parent
343c6ca
commit 0c2ca9f
Showing
8 changed files
with
108 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(in-package #:metabang-bind-test) | ||
|
||
(defun collect-tree (tree &key transform) | ||
"Maps FN over every atom in TREE." | ||
(bind ((transform (or transform #'identity)) | ||
((:labels doit (x)) | ||
(cond | ||
;; ((null x) nil) | ||
((atom x) (funcall transform x)) | ||
(t | ||
(cons | ||
(doit (car x)) | ||
(when (cdr x) (doit (cdr x)))))))) | ||
(doit tree))) | ||
|
||
(defun remove-gensyms (tree) | ||
(collect-tree tree :transform (lambda (x) (when (or (not (symbolp x)) | ||
(symbol-package x)) | ||
x)))) |