Re: accumulating with loop
- From: "Alex Mizrahi" <udodenko@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 Sep 2008 00:45:48 +0300
??>> (defmacro loop-x (&key repeat initially for then finally)
??>> `(let ((,for ,initially))
??>> (dotimes (#:i ,repeat) (setf ,for ,then))
??>> ,finally))
??>>
??>> then call would look like:
??>>
??>> (loop-x :repeat n
??>> :initially next-state
??>> :for state
??>> :then (build-nfa regex state)
??>> :finally (return state))
??>>
??>> the only difference is that LOOP has a bit more syntax in :for part.
MP> Aha. So why doesn't the following code work:
MP> (loop :collect i
MP> :for i
MP> :from 0
MP> :below 10 )
MP> ?
because LOOP hasa bit more syntax..
.
- Follow-Ups:
- Re: accumulating with loop
- From: Michal Przybylek
- Re: accumulating with loop
- References:
- accumulating with loop
- From: Matthew D Swank
- Re: accumulating with loop
- From: Michal Przybylek
- Re: accumulating with loop
- From: Matthew D Swank
- Re: accumulating with loop
- From: Michal Przybylek
- Re: accumulating with loop
- From: Alex Mizrahi
- Re: accumulating with loop
- From: Michal Przybylek
- Re: accumulating with loop
- From: Alex Mizrahi
- Re: accumulating with loop
- From: Michal Przybylek
- accumulating with loop
- Prev by Date: Re: Data type, representation and selection?
- Next by Date: Re: accumulating with loop
- Previous by thread: Re: accumulating with loop
- Next by thread: Re: accumulating with loop
- Index(es):
Relevant Pages
|