[funds-cvs] r195 - trunk/funds/src
abaine at common-lisp.net
abaine at common-lisp.net
Mon Aug 20 16:36:38 UTC 2007
Author: abaine
Date: Mon Aug 20 12:36:37 2007
New Revision: 195
Modified:
trunk/funds/src/stack.lisp
Log:
Added stack-count and stack-count-if.
Modified: trunk/funds/src/stack.lisp
==============================================================================
--- trunk/funds/src/stack.lisp (original)
+++ trunk/funds/src/stack.lisp Mon Aug 20 12:36:37 2007
@@ -58,4 +58,10 @@
(defun stack-as-list (stack)
"This function is here in case the implementation of stack changes from what
it is now, a list."
- stack)
\ No newline at end of file
+ stack)
+
+(defun stack-count (item stack &key (key #'identity) (test #'eql))
+ (count item stack :key key :test test))
+
+(defun stack-count-if (predicate stack &key (key #'identity))
+ (count-if predicate stack :key key))
More information about the Funds-cvs
mailing list