HCoop
/
clinton
/
parenscript.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
578e856
)
Made the COUNT clause in PS LOOP evaluate its term before counting (and skip nil)
author
Daniel Gackle
<danielgackle@gmail.com>
Wed, 5 Aug 2009 23:51:32 +0000
(17:51 -0600)
committer
Daniel Gackle
<danielgackle@gmail.com>
Wed, 5 Aug 2009 23:51:32 +0000
(17:51 -0600)
like CL does.
src/lib/ps-loop.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/ps-loop.lisp
b/src/lib/ps-loop.lisp
index
38ea78c
..
2dd5ef7
100644
(file)
--- a/
src/lib/ps-loop.lisp
+++ b/
src/lib/ps-loop.lisp
@@
-80,7
+80,7
@@
(pushnew `(var ,var ,initial) prologue :key #'second))
(case kind
(:sum `(incf ,var ,term))
- (:count `(
incf ,var
))
+ (:count `(
unless (null ,term) (incf ,var)
))
(:minimize `(setf ,var (if (null ,var) ,term (min ,var ,term))))
(:maximize `(setf ,var (if (null ,var) ,term (max ,var ,term))))
(:collect `((@ ,var :push) ,term))))