[cl-enumeration-cvs] CVS enumerations

mantoniotti mantoniotti at common-lisp.net
Wed Dec 8 15:51:12 UTC 2010


Update of /project/cl-enumeration/cvsroot/enumerations
In directory cl-net:/tmp/cvs-serv8189

Added Files:
	iterate-enumeration.lisp 
Log Message:
Added file.



--- /project/cl-enumeration/cvsroot/enumerations/iterate-enumeration.lisp	2010/12/08 15:51:12	NONE
+++ /project/cl-enumeration/cvsroot/enumerations/iterate-enumeration.lisp	2010/12/08 15:51:12	1.1
;;;; -*- Mode: Lisp -*-

;;;; iterate-enumeration.lisp --
;;;; ITERATE extension for ENUMERATIONs.

(in-package "ITERATE")

(defmacro-driver (FOR var OVER enum)
  (let ((e (gensym "ENUM-"))
        (kwd (if generate 'generate 'for))
        )
    `(progn
       (with ,e = ,enum)
       (,kwd ,var next (if (enum:has-more-elements-p ,e)
                           (enum:next ,e)
                           (terminate))))))

;;;; end of file -- iterate-enumeration.lisp --




More information about the Cl-enumeration-cvs mailing list